Skip to content

fix(providers): scope codex effort defaults and options to per-model capability#133

Merged
astyfx merged 1 commit into
mainfrom
feat/gpt56--continue--20260710-013953
Jul 10, 2026
Merged

fix(providers): scope codex effort defaults and options to per-model capability#133
astyfx merged 1 commit into
mainfrom
feat/gpt56--continue--20260710-013953

Conversation

@astyfx

@astyfx astyfx commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

  • GPT-5.6's per-model reasoning-effort scale (Sol/Terra up to ultra, Luna up to max, GPT-5.5 up to xhigh) wasn't reflected anywhere in the UI or default-resolution logic; effort pickers offered the full scale regardless of the selected model.
  • Adds a dynamic (App Server model/list) + static per-model effort registry so:
    • the default Codex effort prefers Codex's own recommendation, falling back to medium only when unknown
    • every effort selector (preset editor, chat-input cycle, settings default, providers-section reasoning help) is scoped to what the active model actually accepts, clamping to the nearest supported value on model switch
  • Adds the missing max/ultra entries to the providers-section reasoning help list (previously stopped at xhigh)
  • Merges the App Server's model/list catalog with the static GPT-5.6 catalog so newer models stay selectable even against an older installed Codex binary
  • Fixes the preset-edit popover in PresetBar closing itself immediately due to Radix's default focus-return stealing focus from the freshly opened editor

Key changes

  • src/lib/providers/model-catalog.ts: supportedCodexReasoningEfforts capability field, dynamic default/supported-effort registries, listCodexReasoningEffortsForModel, clampCodexEffortToModel
  • src/lib/providers/use-codex-model-catalog.ts: registers dynamic default/supported efforts from the live catalog fetch; merges dynamic + static model lists
  • src/lib/providers/runtime-option-contract.ts: listCodexEffortOptionsForModel helper
  • src/lib/task-presets.ts, src/components/layout/task-preset-editor.tsx: model-scoped effort options in the preset editor
  • src/components/session/chat-input.runtime.ts, ChatInput.tsx: model-scoped effort cycling + clamp on model switch
  • src/components/layout/settings-dialog-sections.tsx, settings-dialog-providers-section.tsx: model-scoped default-effort selector; added max/ultra to the reasoning help list
  • src/components/layout/PresetBar.tsx: onCloseAutoFocus fix for the edit popover
  • src/store/app.store.ts: default codexReasoningEffort updated to xhigh (verified server default for the default model)

Test plan

  • bun run typecheck
  • Focused tests: model-catalog, codex-model-catalog-merge (new), codex-runtime-options, task-presets, provider-runtime-options, ipc-schemas, chat-input.runtime, model-selector-utils, model-shortcuts, provider-mode-presets — 107 pass / 0 fail
  • Manual: open the preset bar, click "Edit…" on a preset and confirm the popover stays open; switch a Codex preset/chat model to GPT-5.6 Luna and confirm "Ultra" is not offered

…capability

GPT-5.6's per-model reasoning-effort scale (Sol/Terra up to ultra, Luna up to
max, GPT-5.5 up to xhigh) wasn't reflected anywhere: the default effort
fallback ignored Codex's own recommendation, and every effort picker (preset
editor, chat input cycle, settings default, providers-section help) offered
the full scale regardless of the selected model. Also fixes the preset-edit
popover closing itself immediately via Radix's default focus-return, and
merges the App Server's model/list catalog with the static GPT-5.6 catalog
so newer models are always selectable even on older installed Codex binaries.

- Add dynamic + static per-model supported/default reasoning-effort registries
  in model-catalog.ts, sourced from the verified codex-cli 0.144.1 catalog
- Scope all Codex effort selectors and cycle order to the active model,
  clamping to the nearest supported value on model switch
- Add missing max/ultra entries to the providers-section reasoning help list
- Fix PresetBar edit popover auto-closing via onCloseAutoFocus
@astyfx astyfx enabled auto-merge (squash) July 10, 2026 02:42
@astyfx astyfx merged commit 94eab00 into main Jul 10, 2026
3 checks passed
@astyfx astyfx deleted the feat/gpt56--continue--20260710-013953 branch July 10, 2026 02:42
@astyfx astyfx mentioned this pull request Jul 10, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants