Skip to content

Model reasoning effort missing 'max' (and 'minimal') in Pi integration config #467

Description

@Smith-106

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 max for providers that support it (or at minimum allow max to be passed through), matching the Kimi channel's so enumeration.
  • oj() should accept minimal too — it is present in the UI enumeration (sy) but currently mapped to null.

Suggested fix

  1. Add "max" to sy: ["off","minimal","low","medium","high","xhigh","max"]
  2. Update oj() to accept minimal and max (or align it with the same enumeration used by the UI)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions