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.
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-maxshould offerlow/medium/xhighand notmax/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,applyReasoningLevelsappendsmaxandultrato every reasoning model unlesspreserveExactis set, andpreserveExactonly applies to exact-combo models (provider === COMBO_NAMESPACE). As a result, afterocx syncthe entryalibaba-token-plan-intl/qwen3.8-maxemitssupported_reasoning_levels = [low, medium, xhigh, max, ultra]even whenmodelReasoningEffortsis 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 viaclampToSupportedCodexEffortalready keeps requests correct, so this should only affect what the picker shows. Ideally the flag keepsmaxavailable for subagentspawn_agent(so that path doesn't hard-fail) while hidingultra, 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 foralibaba-token-plan-intl/qwen3.8-maxshould advertisesupported_reasoning_levels = [low, medium, xhigh](no syntheticmax/ultra).Alternatives or workarounds
Today the only workarounds are to define the models as exact combos (whch changes their slug to
combo/...) or to usenoReasoningModels(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?: booleanon the provider, or reusemodelReasoningEffortsas the authoritative advertised ladder. This request is for per-model control over the advertised effort ladder.