- broker: a context-window 400 fails its generation (fences nothing) and goes back to Pi as context_length_exceeded, so Pi compacts and resends - runner: new generation ID after compaction, wait for Pi's resumed run, record kept_messages; drop agent/context-mask.js and context_mask_chars - models.json: contextWindow large so Pi compacts only on a real overflow, never on an estimate right before a pause (resume would not match) - export: compactions[] gives what the model actually saw after each one - prompt: keep facts and acceptance, drop how-to rules and coaching (SYSTEM.md 89->64 lines, e2e.md 27->20); stage status == stage wait Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.4 KiB
Cheetah
38 lines
1.4 KiB
Cheetah
{
|
||
"_comment": "渲染到 ~/.pi/agent/models.json(chmod 600)。{TEACHER_API_KEY}/{STUDENT_*} 由 `bench agent setup` 从 bench/.env.local 填。字段名对照 pi 版本文档(P3 核对:providers.<name>.{baseUrl, api, apiKey, models[]})。contextWindow 故意写大:Pi 只在服务端报上下文超长时才压缩并续跑,不会在暂停退出前按估算先压缩(那样续跑的请求就和原来对不上)。",
|
||
"providers": {
|
||
"dr-gateway": {
|
||
"baseUrl": "{TEACHER_BASE_URL}",
|
||
"api": "openai-completions",
|
||
"apiKey": "{TEACHER_API_KEY}",
|
||
"models": [
|
||
{
|
||
"id": "{TEACHER_MODEL}",
|
||
"name": "{TEACHER_MODEL} (teacher)",
|
||
"reasoning": false,
|
||
"input": ["text"],
|
||
"contextWindow": 10000000,
|
||
"maxTokens": 16384,
|
||
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
|
||
}
|
||
]
|
||
},
|
||
"student-vllm": {
|
||
"baseUrl": "{STUDENT_BASE_URL}",
|
||
"api": "openai-completions",
|
||
"apiKey": "{STUDENT_API_KEY}",
|
||
"models": [
|
||
{
|
||
"id": "{STUDENT_MODEL}",
|
||
"name": "student (vLLM)",
|
||
"reasoning": false,
|
||
"input": ["text"],
|
||
"contextWindow": 10000000,
|
||
"maxTokens": 8192,
|
||
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|