Skip to content

Feature request: per-model option to stop advertising synthetic max/ultra reasoning rungs on models that don't support them #1870

Description

@marcellmanfrin

What are you trying to accomplish?

I need to route Codex to the Alibaba Token Plan (Qwen) endpoint and have the model picker advertise only the reasoning efforts each Qwen model actually supports. For example, qwen3.8-max should offer low/medium/xhigh and not max/ultra, so the UI reflects the real capability of each model.

What prevents this today?

The catalog row for any reasoning-capable routed model is padded with synthetic top rungs. In src/codex/catalog/effort.ts, applyReasoningLevels appends max and ultra to every reasoning model unless preserveExact is set, and preserveExact only applies to exact-combo models (provider === COMBO_NAMESPACE). As a result, after ocx sync the entry alibaba-token-plan-intl/qwen3.8-max emits supported_reasoning_levels = [low, medium, xhigh, max, ultra] even when modelReasoningEfforts is configured as ["low", "medium", "xhigh"].

What should OpenCodex do?

Add a per-model (or per-provider) config option to suppress the synthetic top rungs so the catalog advertises exactly the provider/registry's supported levels: qwen3.8-max -> [low, medium, xhigh]. Wire clamping via clampToSupportedCodexEffort already keeps requests correct, so this should only affect what the picker shows. Ideally the flag keeps max available for subagent spawn_agent (so that path doesn't hard-fail) while hiding ultra, or gates the mock entirely behind user choice.

Example usage or interface

With a provider configured as:

{
  "providers": {
    "alibaba-token-plan-intl": {
      "adapter": "openai-chat",
      "baseUrl": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
      "apiKey": "${BAILIAN_TOKEN_PLAN_API_KEY}",
      "modelReasoningEfforts": { "qwen3.8-max": ["low", "medium", "xhigh"] }
    }
  }
}

After ocx sync, the catalog entry for alibaba-token-plan-intl/qwen3.8-max should advertise supported_reasoning_levels = [low, medium, xhigh] (no synthetic max/ultra).

Alternatives or workarounds

Today the only workarounds are to define the models as exact combos (whch changes their slug to combo/...) or to use noReasoningModels (which removes the effort control entirely). Neither preserves the model identity while trimming only the unsupported top rungs.

Additional context

Suggested implementation: add e.g. preserveExactReasoningRungs?: boolean on the provider, or reuse modelReasoningEfforts as the authoritative advertised ladder. This request is for per-model control over the advertised effort ladder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    catalogModel catalog, slugs, visibility, routed entriesenhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions