Skip to content

feat: add dynamic model effort selection#8

Open
xiang-lee wants to merge 2 commits intograpeot:masterfrom
xiang-lee:codex/add-model-variant-selector
Open

feat: add dynamic model effort selection#8
xiang-lee wants to merge 2 commits intograpeot:masterfrom
xiang-lee:codex/add-model-variant-selector

Conversation

@xiang-lee
Copy link
Copy Markdown
Contributor

Summary

  • add a dynamic effort selector next to the model picker when the selected model exposes variants
  • persist the selected variant per session and send it through prompt_async
  • hide the selector for models that do not advertise any variants

Changes

  • decode model variants from /config/providers
  • restore and persist selectedVariantBySession
  • normalize invalid saved variants when switching models or sessions
  • include variant in prompt requests and message decoding
  • add a chat toolbar menu for Auto / None / Low / Medium / High / Extra High based on the currently selected model

Why

The server already exposes model-specific effort/variant capabilities, but the iOS client only allowed model selection. This change keeps the UI driven by server config instead of hardcoding per-model options, so the same client works with providers that expose different variant sets.

Validation

  • xcodebuild -project OpenCodeClient/OpenCodeClient.xcodeproj -scheme OpenCodeClient -configuration Debug -destination 'generic/platform=iOS Simulator' build
  • manually verified against a running opencode server that exposes variants for GPT-5.4
  • confirmed the effort menu only appears for models with variants and that Extra High can be selected

Screenshot

Dynamic effort menu

@xiang-lee xiang-lee force-pushed the codex/add-model-variant-selector branch from a64c49e to 4eb6da4 Compare March 24, 2026 23:20
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.

1 participant