docs(reference): document run_subagent's provider, three gateway groups, and max_tokens (#126)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,12 +32,12 @@ When a model entry has no inline `api_key`, the AgentHub gateway falls back to t
|
||||
| --- | --- | --- |
|
||||
| deepseek | `DEEPSEEK_API_KEY` | `DEEPSEEK_BASE_URL` |
|
||||
| anthropic | `ANTHROPIC_API_KEY` | `ANTHROPIC_BASE_URL` |
|
||||
| openai, openrouter, siliconflow, custom | `OPENAI_API_KEY` | `OPENAI_BASE_URL` |
|
||||
| openai, openrouter, fireworks, siliconflow, qwen-token-plan, qwen-pay-as-you-go, custom | `OPENAI_API_KEY` | `OPENAI_BASE_URL` |
|
||||
| google | `GEMINI_API_KEY` | `GEMINI_BASE_URL` |
|
||||
| zhipu | `ZAI_API_KEY` | `ZAI_BASE_URL` |
|
||||
| moonshot | `MOONSHOT_API_KEY` | `MOONSHOT_BASE_URL` |
|
||||
|
||||
The openrouter, siliconflow, and custom groups speak the OpenAI-compatible protocol, hence the shared `OPENAI_*` variables. Provider groups and the built-in model catalog are covered in [Models & Providers](/models).
|
||||
The openrouter, fireworks, siliconflow, qwen-token-plan, qwen-pay-as-you-go, and custom groups speak the OpenAI-compatible protocol, hence the shared `OPENAI_*` variables. Provider groups and the built-in model catalog are covered in [Models & Providers](/models).
|
||||
|
||||
## Project config
|
||||
|
||||
@@ -60,6 +60,7 @@ Model entry (`[[models]]`) fields:
|
||||
| `client_type` | AgentHub client protocol; inferred from `model_id` by default — third-party OpenAI-compatible models should set `openai` |
|
||||
| `display_name` | Display name; persisted only when it differs from the built-in catalog |
|
||||
| `vision` | Whether image input is supported; defaults to supported |
|
||||
| `max_tokens` | Per-model max output tokens; overrides the Agent's `model.max_tokens` when set, omitted = inherit it |
|
||||
| `pricing` | Three price buckets `cache_read` / `cache_write` / `output`, in USD per million Tokens (`unit = "usd_per_mtok"`) |
|
||||
| `api_key` | Inline credential; when empty, falls back to the provider environment variable |
|
||||
| `base_url` | Custom base URL; preset for gateway models |
|
||||
|
||||
@@ -32,12 +32,12 @@ CLI 与服务端启动时会自动加载工作目录下的 `.env` 文件。
|
||||
| --- | --- | --- |
|
||||
| deepseek | `DEEPSEEK_API_KEY` | `DEEPSEEK_BASE_URL` |
|
||||
| anthropic | `ANTHROPIC_API_KEY` | `ANTHROPIC_BASE_URL` |
|
||||
| openai、openrouter、siliconflow、custom | `OPENAI_API_KEY` | `OPENAI_BASE_URL` |
|
||||
| openai、openrouter、fireworks、siliconflow、qwen-token-plan、qwen-pay-as-you-go、custom | `OPENAI_API_KEY` | `OPENAI_BASE_URL` |
|
||||
| google | `GEMINI_API_KEY` | `GEMINI_BASE_URL` |
|
||||
| zhipu | `ZAI_API_KEY` | `ZAI_BASE_URL` |
|
||||
| moonshot | `MOONSHOT_API_KEY` | `MOONSHOT_BASE_URL` |
|
||||
|
||||
openrouter、siliconflow 与 custom 分组走 OpenAI 兼容协议,因此复用 `OPENAI_*` 变量。Provider 分组与内置模型目录见[模型与 Provider](/models)。
|
||||
openrouter、fireworks、siliconflow、qwen-token-plan、qwen-pay-as-you-go 与 custom 分组走 OpenAI 兼容协议,因此复用 `OPENAI_*` 变量。Provider 分组与内置模型目录见[模型与 Provider](/models)。
|
||||
|
||||
## Project 配置
|
||||
|
||||
@@ -60,6 +60,7 @@ openrouter、siliconflow 与 custom 分组走 OpenAI 兼容协议,因此复用
|
||||
| `client_type` | AgentHub 客户端协议;缺省由 `model_id` 推断,OpenAI 兼容的第三方模型应设为 `openai` |
|
||||
| `display_name` | 展示名;仅在与内置目录不同时持久化 |
|
||||
| `vision` | 是否支持图片输入;缺省视为支持 |
|
||||
| `max_tokens` | 单模型最大输出 Token;设置后覆盖 Agent 的 `model.max_tokens`,缺省则继承 |
|
||||
| `pricing` | 三档价格 `cache_read` / `cache_write` / `output`,单位 USD 每百万 Token(`unit = "usd_per_mtok"`) |
|
||||
| `api_key` | 内联凭证;留空回退到 Provider 环境变量 |
|
||||
| `base_url` | 自定义 Base URL;网关模型预置 |
|
||||
|
||||
@@ -160,7 +160,8 @@ On POSIX, Ctrl-C sends `SIGINT` to the session's process group, interrupting the
|
||||
{
|
||||
prompt: string; // required: the complete subtask (all context + the exact final output expected)
|
||||
agent_id?: string; // the child Agent; defaults to the current Agent
|
||||
model_id?: string; // the child Session's model; inherits the parent Session's model when omitted
|
||||
model_id?: string; // the child Session's model, paired with provider; omit both to inherit the parent Session's model
|
||||
provider?: string; // the provider group model_id belongs to; required whenever model_id is given
|
||||
yield_time_ms?: number; // foreground wait; default 300000
|
||||
description: string; // required while call_description is on
|
||||
}
|
||||
|
||||
@@ -158,7 +158,8 @@ POSIX 上 Ctrl-C 向会话进程组发送 `SIGINT`,中断前台命令。Window
|
||||
{
|
||||
prompt: string; // 必填:完整的子任务(含全部上下文与期望的最终产出)
|
||||
agent_id?: string; // 子 Agent;缺省复用当前 Agent
|
||||
model_id?: string; // 子 Session 模型;缺省继承父 Session 的模型
|
||||
model_id?: string; // 子 Session 模型,须与 provider 成对给出;两者都缺省时继承父 Session 的模型
|
||||
provider?: string; // model_id 所属的 provider 组;给出 model_id 时必填
|
||||
yield_time_ms?: number; // 前台等待时长;默认 300000
|
||||
description: string; // 开关开启时必填
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user