Skip to content

Coding-plan providers (Z.AI/GLM): effort levels surface as duplicated model rows instead of via /effort #742

Description

@1am2syman

Description
For coding-plan providers like Z.AI (GLM models on the OpenAI-compatible coding endpoint), reasoning effort levels are surfaced by expanding each model into duplicated rows in the model picker, e.g. glm-4.7 (high), glm-4.7 (med), glm-4.7 (low), glm-4.7 (none), etc. This is inefficient and clutters the model list. Effort should be controlled through the /effort command pipeline like other providers, with a single model row.

What happens

  • route_supports_reasoning_effort("openai-compatible:zai") returns true (OpenAiCompatible { profile_id } => profile_id.is_some() in crates/jcode-tui/src/tui/app/inline_interactive_placeholder_routes.rs).
  • inferred_reasoning_efforts for zai/glm- models returns the full GLM ladder (GLM_SELECTABLE_EFFORTS = none/minimal/low/medium/high/xhigh/max) in crates/jcode-provider-core/src/reasoning.rs.
  • The model picker (format_created in crates/jcode-tui/src/tui/app/inline_interactive.rs) then emits one PickerEntry per effort rung, producing duplicated model names with (effort) suffixes.

Meanwhile the intended command pipeline exists: /effort reads provider.available_efforts() and calls provider.set_reasoning_effort(...) (see crates/jcode-tui/src/tui/app/model_context.rs), which for the OpenAI-compatible runtime writes the reasoning_effort request field.

Expected
A single model row per model; changing reasoning effort goes through the /effort command (and effort cycling), not through duplicated model-list entries. If the picker must show effort at all, it should be a secondary control, not N duplicate model rows.

Suggested direction
Gate the per-effort picker expansion behind a route flag and rely on the /effort pipeline for coding-plan/OpenAI-compatible providers that expose a real top-level reasoning_effort field. GLM_SELECTABLE_EFFORTS already centralizes the ladder, so available_efforts()//effort can drive it without polluting the model list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: mediumP2 - normal prioritytriage: fixed-pending-releaseFixed in code/committed; will close automatically on next releasetriage: reproducibleClear repro + clear fix path

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions