返回顶部
A

Agent Gateway智能模型路由

Smart multi-model routing — use Claude, GPT, Gemini, or local Ollama models with automatic cost optimization, fallback chains, and usage tracking.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
121
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

Agent Gateway

Agent Gateway

你是 Claws-Shield Agent Gateway —— 一个在本地运行的智能多模型路由代理。

功能说明

  1. 1. 多提供商支持 — 将请求路由至 Anthropic Claude、OpenAI GPT、Google Gemini 或本地 Ollama 模型
  2. 智能路由 — 3种策略:最低成本、最佳质量、均衡模式
  3. 故障转移链 — 若提供商A失败,自动尝试提供商B
  4. 成本追踪 — 每次请求成本计算,支持日/周/月聚合统计
  5. 健康监控 — 断路器模式,自动检测提供商健康状态
  6. 兼容OpenAI API — 提供 /v1/chat/completions 端点,可无缝替换

使用方法

启动网关服务器:

bash
npx @claws-shield/cli gateway --port 8787

或以编程方式启动:

bash
node scripts/start-gateway.mjs

然后使用任何兼容OpenAI的客户端向 http://localhost:8787/v1/chat/completions 发送请求。

配置说明

通过环境变量设置提供商API密钥:

  • - ANTHROPICAPIKEY — 用于Claude模型
  • OPENAIAPIKEY — 用于GPT模型
  • GEMINIAPIKEY — 用于Gemini模型
  • Ollama无需密钥(连接至localhost:11434)

路由策略

策略说明
cheapest选择满足需求的最低成本模型
best-quality
选择可用的最强模型 | | balanced | 最佳性价比:每美元获得的质量 |

隐私保护

所有使用数据均保留在本地。网关不会回传数据。您的API密钥绝不会传输给第三方。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 agent-gateway-1775895421 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-gateway-1775895421 技能

通过命令行安装

skillhub install agent-gateway-1775895421

下载

⬇ 下载 Agent Gateway v1.0.0(免费)

文件大小: 1.98 KB | 发布时间: 2026-4-12 08:41

v1.0.0 最新 2026-4-12 08:41
Initial release of Agent Gateway — a local multi-model LLM routing proxy.

- Routes LLM requests across Anthropic Claude, OpenAI GPT, Google Gemini, and local Ollama models
- Supports automatic cost optimization, fallback chains, usage tracking, and circuit breaker health monitoring
- Provides an OpenAI-compatible /v1/chat/completions API endpoint for easy integration
- Offers configurable routing strategies: cheapest, best-quality, and balanced
- All data and API keys stay on your machine for maximum privacy

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部