Skip to content

fix(tui): make OAuth model configuration provider-aware - #975

Merged
benclawbot merged 40 commits into
mainfrom
agent/974-provider-aware-tui
Aug 18, 2026
Merged

fix(tui): make OAuth model configuration provider-aware#975
benclawbot merged 40 commits into
mainfrom
agent/974-provider-aware-tui

Conversation

@benclawbot

Copy link
Copy Markdown
Owner

Summary

  • make the TUI model modal provider-aware for authentication requirements
  • discover the authenticated ChatGPT OAuth model catalog from the local OAuth gateway and launch browser sign-in when OAuth is selected but unavailable
  • derive selectable effort values from provider/model reasoning capability metadata
  • persist supported reasoning effort through the shared configuration command path before applying the session effort budget
  • never request or forward an API key for openai-oauth

Closes #974

Copy link
Copy Markdown
Owner Author

@codex implement #974 directly on this PR. Replace and remove the temporary materialization/trigger workflow scaffolding so the final diff is source-only.

Requirements:

  • Reuse the provider catalog/model registry and the browser OAuth architecture already established by merged PR Consolidate provider catalog and browser OAuth flow #809; do not introduce a second TUI-owned credential/process authority.
  • openai-oauth must never prompt for, require, store, or forward an API key.
  • When OAuth state is absent/expired, expose/execute the existing browser-based ChatGPT OAuth connect/reconnect flow from the in-session TUI, then validate the authenticated gateway.
  • Populate the model selector from authenticated OAuth model discovery (/v1/models) and preserve the authoritative curated fallback only when discovery is unavailable. Do not hard-code a single gpt-5 choice as the effective account catalog.
  • Derive reasoning/effort choices from provider+model capability metadata. Recompute them when provider/model changes and keep a current value only if still valid.
  • Make selected reasoning effective in the provider request/configuration path, not merely a cosmetic TUI/turn-budget label. Add a request/config fixture proving two supported reasoning levels result in distinct provider reasoning configuration.
  • Preserve the last authoritative provider/model/auth state across frontend_control failures; do not silently fall back to minimax/generic defaults. Do not duplicate Interactive TUI loses a completed implementation to a stale session revision race #952's stale-revision fix.
  • Add focused regressions for OAuth no-key behavior, discovery, capability-driven effort, provider/model switching, and effective reasoning.
  • Run formatting, focused tests/Clippy for affected crates, then the repository-required CI. Keep the PR draft until the exact final head is green.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard.

@benclawbot benclawbot added the bug Something isn't working label Aug 18, 2026 — with ChatGPT Codex Connector
@benclawbot benclawbot closed this Aug 18, 2026
@benclawbot benclawbot reopened this Aug 18, 2026

@benclawbot benclawbot left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/materialize-974

Copy link
Copy Markdown
Owner Author

/materialize-974

1 similar comment

Copy link
Copy Markdown
Owner Author

/materialize-974

Copy link
Copy Markdown
Owner Author

/materialize-974-force

@benclawbot
benclawbot marked this pull request as ready for review August 18, 2026 13:39
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@benclawbot
benclawbot marked this pull request as draft August 18, 2026 13:39
@benclawbot
benclawbot marked this pull request as ready for review August 18, 2026 13:39
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@benclawbot
benclawbot marked this pull request as draft August 18, 2026 13:39
@benclawbot
benclawbot marked this pull request as ready for review August 18, 2026 15:43
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@benclawbot
benclawbot merged commit f049b17 into main Aug 18, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make TUI model configuration provider-aware for OpenAI OAuth, model discovery, reasoning effort, and auth recovery

1 participant