mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-08 08:11:38 +00:00
remove Vercel AI Gateway and Vercel Sandbox (#33067)
* remove Vercel AI Gateway provider and Vercel Sandbox terminal backend Both Vercel-hosted integrations are removed end-to-end. Users on the AI Gateway should switch to OpenRouter or one of the other aggregators (Nous Portal, Kilo Code). Users on the Vercel Sandbox backend should switch to Docker, Modal, Daytona, or SSH. What's removed: - `plugins/model-providers/ai-gateway/` provider plugin - `hermes_cli/vercel_auth.py` Vercel-Sandbox auth helper - `tools/environments/vercel_sandbox.py` terminal backend - `ai-gateway` provider wiring across auth, doctor, setup, models, config, status, providers, main, web_server, model_normalize, dump - `vercel_sandbox` backend wiring across terminal_tool, file_tools, code_execution_tool, file_operations, approval, skills_tool, environments/local, credential_files, lazy_deps, prompt_builder, cli, gateway/run - `AI_GATEWAY_BASE_URL` constant, `_AI_GATEWAY_HEADERS` auxiliary-client header set, run_agent base-URL header/reasoning special-cases - `[vercel]` pyproject extra and `vercel`/`vercel-workers` from uv.lock - env vars: `AI_GATEWAY_API_KEY`, `AI_GATEWAY_BASE_URL`, `VERCEL_TOKEN`, `VERCEL_PROJECT_ID`, `VERCEL_TEAM_ID`, `VERCEL_OIDC_TOKEN`, `TERMINAL_VERCEL_RUNTIME` - Tests: deletes test_ai_gateway_models.py and test_vercel_sandbox_environment.py; scrubs references across 23 surviving test files (no entire tests deleted unless they were dedicated to AI Gateway / Sandbox) - Docs: provider tables, env-var reference, setup guides, security notes, tool config, terminal-backend tables — English plus zh-Hans i18n parity - `hermes-agent` skill: provider table entry and remote-backend list What stays (intentional): - `popular-web-designs/templates/vercel.md` — CSS design reference, unrelated to Vercel-the-AI-product - `x-vercel-id` in `stream_diag.py` headers — generic Vercel CDN response header, useful diag signal on any Vercel-hosted endpoint - `vercel-labs/agent-browser` URL in browser config — lightpanda browser project, different OSS effort - `userStories.json` historical contributor entry mentioning Vercel Sandbox — archive, not active docs Validation: - 1153 tests in the 22 targeted files pass (`scripts/run_tests.sh`) - Full repo `py_compile` clean - Live import of every touched module + invariant check (no `ai-gateway` in `PROVIDER_REGISTRY`, no `_AI_GATEWAY_HEADERS`, no `vercel_sandbox` in `_REMOTE_TERMINAL_BACKENDS`) * test: convert profile-count check from change-detector to invariant The hardcoded "== 34" assertion broke when ai-gateway was removed. Per AGENTS.md change-detector-test guidance, assert the relationship (registry count >= number of plugin dirs) instead of a literal count. Counts shift when providers are added/removed; that's expected.
This commit is contained in:
parent
cb38ce28cb
commit
febc4cfec0
95 changed files with 111 additions and 3088 deletions
|
|
@ -211,7 +211,7 @@ CLI、gateway、cron、ACP 及辅助调用共用的运行时解析器。将 `(pr
|
|||
|
||||
### 工具系统
|
||||
|
||||
中央工具注册表(`tools/registry.py`),包含约 28 个 toolset 中的 70+ 个已注册工具。每个工具文件在导入时自行注册。注册表负责 schema 收集、分发、可用性检查和错误包装。终端工具支持 7 种后端(local、Docker、SSH、Daytona、Modal、Singularity、Vercel Sandbox)。
|
||||
中央工具注册表(`tools/registry.py`),包含约 28 个 toolset 中的 70+ 个已注册工具。每个工具文件在导入时自行注册。注册表负责 schema 收集、分发、可用性检查和错误包装。终端工具支持 6 种后端(local、Docker、SSH、Daytona、Modal、Singularity)。
|
||||
|
||||
→ [工具运行时](./tools-runtime.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ Hermes 拥有一个共享的 provider 运行时解析器,用于以下场景:
|
|||
|
||||
当前 provider 系列包括(完整内置集合见 `plugins/model-providers/`):
|
||||
|
||||
- AI Gateway(Vercel)
|
||||
- OpenRouter
|
||||
- Nous Portal
|
||||
- OpenAI Codex
|
||||
|
|
@ -93,18 +92,13 @@ Hermes 拥有一个共享的 provider 运行时解析器,用于以下场景:
|
|||
- ACP 编辑器会话
|
||||
- 辅助模型任务
|
||||
|
||||
## AI Gateway
|
||||
## OpenRouter 与自定义 OpenAI 兼容 base URL
|
||||
|
||||
在 `~/.hermes/.env` 中设置 `AI_GATEWAY_API_KEY`,并使用 `--provider ai-gateway` 运行。Hermes 从 gateway 的 `/models` 端点获取可用模型,筛选出支持工具调用的语言模型。
|
||||
|
||||
## OpenRouter、AI Gateway 与自定义 OpenAI 兼容 base URL
|
||||
|
||||
Hermes 包含相关逻辑,以避免在存在多个 provider 密钥时(例如同时存在 `OPENROUTER_API_KEY`、`AI_GATEWAY_API_KEY` 和 `OPENAI_API_KEY`)将错误的 API key 泄露给自定义端点。
|
||||
Hermes 包含相关逻辑,以避免在存在多个 provider 密钥时(例如同时存在 `OPENROUTER_API_KEY` 和 `OPENAI_API_KEY`)将错误的 API key 泄露给自定义端点。
|
||||
|
||||
每个 provider 的 API key 仅作用于其自身的 base URL:
|
||||
|
||||
- `OPENROUTER_API_KEY` 仅发送至 `openrouter.ai` 端点
|
||||
- `AI_GATEWAY_API_KEY` 仅发送至 `ai-gateway.vercel.sh` 端点
|
||||
- `OPENAI_API_KEY` 用于自定义端点及作为回退
|
||||
|
||||
Hermes 还区分以下两种情况:
|
||||
|
|
@ -115,7 +109,7 @@ Hermes 还区分以下两种情况:
|
|||
这种区分对以下场景尤为重要:
|
||||
|
||||
- 本地模型服务器
|
||||
- 非 OpenRouter/非 AI Gateway 的 OpenAI 兼容 API
|
||||
- 非 OpenRouter 的 OpenAI 兼容 API
|
||||
- 无需重新运行 setup 即可切换 provider
|
||||
- 通过 config 保存的自定义端点,即使当前 shell 中未导出 `OPENAI_BASE_URL` 也应正常工作
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,6 @@ registry.dispatch(name, args, **kwargs)
|
|||
- singularity
|
||||
- modal
|
||||
- daytona
|
||||
- vercel_sandbox
|
||||
|
||||
还支持:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue