fix(core): honor the -1 sentinels for max_turns and max_tokens (#56)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-24 16:18:38 +08:00
committed by GitHub
parent 6bbdac132f
commit c7465625a4
10 changed files with 66 additions and 10 deletions
+2 -2
View File
@@ -93,8 +93,8 @@ Edit this file via the CLI (`penguin config model …`) or the Web Models page
| `description` | — | Agent description |
| `version` | `1` | Agent State version (a natural number), incremented on each successful optimization |
| `system_prompt` | built-in template | Required; the only template with placeholder substitution |
| `max_turns` | `100` | Maximum LLM turns per Task |
| `model.max_tokens` | `32000` | Output Token limit per Request |
| `max_turns` | `100` | Maximum LLM turns per Task (-1 removes the cap) |
| `model.max_tokens` | `32000` | Output Token limit per Request (-1 = no cap, provider default) |
| `model.thinking_level` | `medium` | `none` / `low` / `medium` / `high` / `xhigh` |
| `model.timeoutMs` | `120000` | Per-Request timeout (milliseconds) |
| `compaction.max_context_length` | `128000` | Context Token threshold that triggers compaction |
+2 -2
View File
@@ -93,8 +93,8 @@ output = 0.857143
| `description` | — | Agent 描述 |
| `version` | `1` | Agent State 版本号(自然数),每次成功优化自增 |
| `system_prompt` | 内置模板 | 必填;唯一进行占位符替换的模板 |
| `max_turns` | `100` | 单个 Task 的最大 LLM 轮数 |
| `model.max_tokens` | `32000` | 单次输出 Token 上限 |
| `max_turns` | `100` | 单个 Task 的最大 LLM 轮数(-1 不限制) |
| `model.max_tokens` | `32000` | 单次输出 Token 上限(-1 不设上限,用服务商默认) |
| `model.thinking_level` | `medium` | `none` / `low` / `medium` / `high` / `xhigh` |
| `model.timeoutMs` | `120000` | 单次 Request 超时(毫秒) |
| `compaction.max_context_length` | `128000` | 触发压缩的上下文 Token 阈值 |