feat: per-model max output tokens and a conversation-time thinking level backed by agent settings (#28)
Co-authored-by: Alice <alice@prismshadow.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,7 @@ penguin config model add --provider deepseek --model-id deepseek-v4-pro --api-ke
|
||||
| `--api-key <key>` | API key, stored inline in the Project's hidden `.project_config.toml` |
|
||||
| `--base-url <url>` | Custom endpoint base URL |
|
||||
| `--context-window <n>` | Context window size |
|
||||
| `--max-tokens <n>` | Per-model max output tokens (positive integer). Overrides the Agent's `model.max_tokens` when set; omit to inherit — lower it for small-context models |
|
||||
| `--client-type <type>` | Client protocol type |
|
||||
| `--vision` / `--no-vision` | Mark vision input as supported / unsupported |
|
||||
| `--price-cache-read <n>` | Cache-read price |
|
||||
|
||||
@@ -84,6 +84,7 @@ penguin config model add --provider deepseek --model-id deepseek-v4-pro --api-ke
|
||||
| `--api-key <key>` | API Key,内联存入 Project 隐藏文件 `.project_config.toml` |
|
||||
| `--base-url <url>` | 自定义接口地址 |
|
||||
| `--context-window <n>` | 上下文窗口大小 |
|
||||
| `--max-tokens <n>` | 该模型的最大输出长度(正整数)。设置后覆盖 Agent 的 `model.max_tokens`,缺省沿用;小上下文模型建议调低 |
|
||||
| `--client-type <type>` | 客户端协议类型 |
|
||||
| `--vision` / `--no-vision` | 标记是否支持视觉输入 |
|
||||
| `--price-cache-read <n>` | 缓存读价格 |
|
||||
|
||||
@@ -22,6 +22,7 @@ Each Project's available models are recorded in the hidden `.project_config.toml
|
||||
| `provider` | Config group name; paired with `model_id` it forms the unique key |
|
||||
| `model_id` | Upstream request id |
|
||||
| `context_window` | Context window |
|
||||
| `max_tokens` | Optional per-model output cap (max output tokens per request). When set it overrides the Agent's `model.max_tokens`; unset inherits it. Lower it for small-context models: the per-Agent default (32000) cannot fit into e.g. a 32k window together with any prompt. Omitting the field on a Web full-table save clears it |
|
||||
| `client_type` | Protocol hint (e.g. `openai`); inferred by AgentHub from the model id when omitted |
|
||||
| `display_name` | Display name |
|
||||
| `vision` | Whether image input is supported, default true |
|
||||
@@ -76,7 +77,7 @@ Some models in the preset catalog: deepseek-v4-pro / deepseek-v4-flash, gemini-3
|
||||
|
||||
## Thinking levels
|
||||
|
||||
Five levels: `none | low | medium | high | xhigh`, configured per Agent as `model.thinking_level` in `system_config.yaml`, default medium. See [Configuration](/configuration).
|
||||
Five levels: `none | low | medium | high | xhigh`, configured per Agent as `model.thinking_level` in `system_config.yaml`, default medium. The chat draft view offers a quick picker next to the model selector: a picked level is written back to the selected Agent's setting immediately (the switched-to level becomes that Agent's new default and applies from the next session; a running session keeps the level it was created with). See [Configuration](/configuration).
|
||||
|
||||
## Models decoupled from Agents
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ description: 经 AgentHub 单一网关接入模型,以 (provider, model_id)
|
||||
| `provider` | 配置分组名,与 `model_id` 成对构成唯一键 |
|
||||
| `model_id` | 上游请求 id |
|
||||
| `context_window` | 上下文窗口 |
|
||||
| `max_tokens` | 可选的按模型输出上限(单次请求最大输出 Token 数)。设置后覆盖 Agent 的 `model.max_tokens`,缺省沿用;小上下文模型建议调低——按 Agent 的缺省值(32000)加上任意 Prompt 无法放进如 32k 的窗口。Web 整表保存时省略该字段即清除 |
|
||||
| `client_type` | 协议提示(如 `openai`);缺省由 AgentHub 按 model id 推断 |
|
||||
| `display_name` | 显示名 |
|
||||
| `vision` | 是否支持图像输入,默认 true |
|
||||
@@ -76,7 +77,7 @@ api_key = "sk-..."
|
||||
|
||||
## 思考等级
|
||||
|
||||
思考等级共五档:`none | low | medium | high | xhigh`,按 Agent 在 `system_config.yaml` 的 `model.thinking_level` 配置,默认 medium。见 [配置参考](/configuration)。
|
||||
思考等级共五档:`none | low | medium | high | xhigh`,按 Agent 在 `system_config.yaml` 的 `model.thinking_level` 配置,默认 medium。对话草稿页在模型选择器旁提供快捷拾取器:选定档位立即写回所选 Agent 的该项配置(切换后的档位即成为该 Agent 的新默认,自下一个 Session 生效;进行中的 Session 沿用创建时的档位)。见 [配置参考](/configuration)。
|
||||
|
||||
## 模型与 Agent 解耦
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ The interface language (中文 / English / system) and theme (light / dark / sys
|
||||
|
||||
### Creating a Conversation
|
||||
|
||||
A new conversation starts as a draft: pick the Agent, the Workspace (via a server-side directory browser), the approval mode, and the model before sending the first message. The Session is created on first send, and from then on its model and Workspace are locked.
|
||||
A new conversation starts as a draft: pick the Agent, the Workspace (via a server-side directory browser), the approval mode, the model, and the thinking level before sending the first message. The Session is created on first send, and from then on its model and Workspace are locked. Switching the thinking level or the model makes the switched-to value the new default: the level is written back to the selected Agent's `model.thinking_level` immediately, and the picked model carries over as the next conversation's default; a running session keeps the level and model it was created with (the input area shows them read-only).
|
||||
|
||||
There are four approval modes: `allow-all`, `deny-all`, `read-only` (only read-only tools pass), and `always-ask`. See [Tools and Approvals](/tools).
|
||||
|
||||
@@ -76,7 +76,7 @@ Browse the Skill library by group, install Skills onto an Agent, or quick-invoke
|
||||
|
||||
## Model Configuration (/models)
|
||||
|
||||
A per-Project model table grouped by provider. Models can be added and edited: identity is the `(provider, model_id)` pair, credentials are masked, and context window, pricing, and the vision flag are configurable. You can set the default model and the vision model (which reads images on behalf of session models without image input), and run a connectivity test on any entry. Only Project owners can edit. For concepts, see [Models and Providers](/models).
|
||||
A per-Project model table grouped by provider. Models can be added and edited: identity is the `(provider, model_id)` pair, credentials are masked, and context window, max output tokens (a per-model cap overriding the Agent's `model.max_tokens` — lower it for small-context models), pricing, and the vision flag are configurable. You can set the default model and the vision model (which reads images on behalf of session models without image input), and run a connectivity test on any entry. Only Project owners can edit. For concepts, see [Models and Providers](/models).
|
||||
|
||||
## Usage (/usage)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ penguin web
|
||||
|
||||
### 新建会话
|
||||
|
||||
新会话从草稿开始:先选择 Agent、Workspace(服务器端目录浏览器选取)、审批模式与模型,再发送第一条消息。Session 在首次发送时才真正创建,此后该会话的模型与 Workspace 即被锁定。
|
||||
新会话从草稿开始:先选择 Agent、Workspace(服务器端目录浏览器选取)、审批模式、模型与思考等级,再发送第一条消息。Session 在首次发送时才真正创建,此后该会话的模型与 Workspace 即被锁定。切换思考等级或模型时,切换后的值即成为新的默认:思考等级立即写回所选 Agent 的 `model.thinking_level`,所选模型则作为下一个新会话的默认延续;进行中的会话沿用创建时的档位与模型(输入区只读展示)。
|
||||
|
||||
审批模式共四种:`allow-all`(全部放行)、`deny-all`(全部拒绝)、`read-only`(仅放行只读工具)、`always-ask`(每次询问),详见[工具与审批](/tools)。
|
||||
|
||||
@@ -76,7 +76,7 @@ penguin web
|
||||
|
||||
## 模型配置(/models)
|
||||
|
||||
按 Provider 分组展示当前 Project 的模型表格。支持添加与编辑模型:以 `(provider, model_id)` 为唯一标识,凭据以掩码显示,可配置上下文窗口、定价与视觉(vision)标记;可设置默认模型与视觉模型(在会话模型不支持图片输入时代为读图),并对任一模型做连通性测试。仅 Project Owner 可编辑,概念说明见[模型与 Provider](/models)。
|
||||
按 Provider 分组展示当前 Project 的模型表格。支持添加与编辑模型:以 `(provider, model_id)` 为唯一标识,凭据以掩码显示,可配置上下文窗口、最大输出长度(按模型的输出上限,覆盖 Agent 的 `model.max_tokens`——小上下文模型建议调低)、定价与视觉(vision)标记;可设置默认模型与视觉模型(在会话模型不支持图片输入时代为读图),并对任一模型做连通性测试。仅 Project Owner 可编辑,概念说明见[模型与 Provider](/models)。
|
||||
|
||||
## 用量统计(/usage)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user