Model reasoning effort missing 'max' (and 'minimal') in Pi integration config
Bug: Model reasoning effort missing max (and minimal) in Pi integration config
Environment
- codeg version: 0.23.5
- Platform: Windows 11
- Pi integration: provider config generated with
name = "codeg",wire_api = "responses",requires_openai_auth = true
Description
The thinking/reasoning-effort selector in the model settings UI does not offer max, and even when set programmatically, the mapping function rejects it. This limits deep-reasoning workflows on models that support max thinking (e.g. Anthropic/OpenAI/Gemini/OpenRouter providers) when driving Pi.
Evidence
Found in the bundled web frontend (_next/static/chunks/05e5726fe31b6eaf.js):
1. The main settings UI enumeration has no max:
let sy = ["off","minimal","low","medium","high","xhigh"]
sb = [{id:"anthropic",...},{id:"openai",...},{id:"google",...},{id:"openrouter",...}]
2. The mapping function oj() only accepts low/medium/high/xhigh — it rejects both max and minimal:
function oj(e) {
let t = e.trim().toLowerCase();
return "low"===t || "medium"===t || "high"===t || "xhigh"===t ? t : null
}
3. Inconsistency: the Kimi (Moonshot) channel enumeration does include max:
let so = ["minimal","low","medium","high","xhigh","max"] // only used for Kimi
4. Config write path drops the value before it reaches Pi:
model_reasoning_effort = oj(t.modelReasoningEffort) ?? op
Even if max were passed in, oj() returns null so it never reaches the generated Pi provider config. Pi itself fully supports max (thinkingLevelMap maps max → max), so this is purely a codeg-side limitation.
Expected behavior
- The thinking selector should offer
maxfor providers that support it (or at minimum allowmaxto be passed through), matching the Kimi channel'ssoenumeration. oj()should acceptminimaltoo — it is present in the UI enumeration (sy) but currently mapped tonull.
Suggested fix
- Add
"max"tosy:["off","minimal","low","medium","high","xhigh","max"] - Update
oj()to acceptminimalandmax(or align it with the same enumeration used by the UI)
We hope to resolve the issue with the Pi thinking setting soon. The problem is still present.
I’ll take this issue. Current CodeG still filters Pi thinking levels in the frontend and Rust config path, while its pinned [email protected] rejects max.
I’ll update the adapter to a version that advertises model-specific thinking levels, carry supported max and minimal values through selection and persistence, and avoid offering a level a model does not support. I’ll add regression tests for those paths and run an isolated ACP protocol check before opening the PR. The PR will spell out the observed behavior and verification results.