Skip to content

fix(tui): preserve Codex capabilities and OpenCode fast variants #2218

Description

@danielxxomg

Pre-flight Checklist

  • I have searched existing issues and this is not a duplicate.
  • I understand that PRs will be rejected if the linked issue does not have status:approved.

📝 Bug Description

Gentle AI's model-assignment flow does not preserve the full capability metadata advertised by the installed runtimes.

Codex CLI exposes model-specific reasoning levels, speed tiers, and service tiers, but the Codex Custom picker cannot reliably present all valid choices. OpenCode may expose an OpenAI -fast variant while the canonical catalog contains only the base model, causing the variant to be missing from the picker or configuration path.

This is a capability propagation bug. fast is a speed/service selection, not a reasoning effort. Pi is out of scope because it owns its runtime model selector.

🔄 Steps to Reproduce

  1. Run codex debug models using Codex CLI 0.146.0.
  2. Note that gpt-5.6-sol and gpt-5.6-terra advertise ultra, fast, and service-tier metadata, while gpt-5.6-luna advertises max, fast, and service-tier metadata but not ultra.
  3. Open Gentle AI and navigate to Configure Models → Configure Codex models → Custom.
  4. Select the GPT-5.6 models and compare the available choices with the runtime metadata.
  5. Configure an OpenAI model through OpenCode and compare the canonical model ID with its available -fast variant.
  6. Observe that model-specific capabilities, service tiers, or the -fast variant are missing or not persisted separately.

✅ Expected Behavior

The Custom picker should:

  • Use runtime-discovered selectable model IDs while retaining a curated fallback.
  • Show reasoning choices per model.
  • Show max and ultra only when the runtime advertises them.
  • Treat fast as a separate speed/service selection, not as a reasoning effort.
  • Persist the selected Codex service_tier.
  • Materialize an OpenCode -fast alias only when an explicit same-provider canonical model exists.
  • Preserve existing configuration behavior when no service tier is selected.

❌ Actual Behavior

The picker and configuration flow use incomplete or static capability information.

Model-specific reasoning levels such as max and ultra are not reliably exposed according to the installed runtime metadata. The fast capability is not represented as a separate speed/service selection, and an OpenCode -fast variant may be unavailable when only the canonical model exists.

As a result, users cannot select or persist the complete set of capabilities advertised by Codex CLI and OpenCode.

🖥️ Environment

  • Gentle AI: gga v2.10.1; installed gentle-ai binary reports 2.2.4
  • Operating System: CachyOS Linux, x86_64, kernel 7.1.5-1-cachyos
  • AI Agent / Client: Codex CLI 0.146.0 + OpenCode 1.18.8
  • Affected Area: TUI (terminal UI)

💡 Logs / Error Output

Sanitized runtime capability evidence:

codex-cli 0.146.0
OpenCode 1.18.8

gpt-5.6-sol:
  multi_agent_version: v2
  reasoning: low, medium, high, xhigh, max, ultra
  additional_speed_tiers: ["fast"]
  service_tiers: ["priority"]

gpt-5.6-terra:
  multi_agent_version: v2
  reasoning: low, medium, high, xhigh, max, ultra
  additional_speed_tiers: ["fast"]
  service_tiers: ["priority"]

gpt-5.6-luna:
  multi_agent_version: v1
  reasoning: low, medium, high, xhigh, max
  additional_speed_tiers: ["fast"]
  service_tiers: ["priority"]

Additional Context

Related work:

  • #1087 covers runtime Codex model-ID discovery.
  • #2080 covers Codex model discovery, visibility, and API support.
  • #2134 covers asynchronous Codex discovery in the TUI.
  • #1648 and #1695 cover OpenCode provider-ID fallback for variants.
  • #1066 and #1067 introduced the GPT-5.6 defaults but explicitly deferred max/ultra.

A local candidate was implemented with bounded runtime discovery, model-specific effort choices, separate speed/service-tier persistence, safe same-provider OpenCode fast aliases, and asynchronous TUI discovery.

Focused tests, go vet, gofmt, git diff --check, and go build ./cmd/gentle-ai pass. The full repository suite has one unrelated environment-sensitive failure in internal/cli:TestEngramPathGuidanceDefault, which expects a go/bin path fragment while the active Go installation uses a mise-managed path.

No PR will be opened until this issue receives status:approved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:mediumMedium prioritystatus:approvedApproved for implementation — PRs can now be openedtype:bugBug fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions