Skip to content

TUI config cleanup: oss_provider#24254

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/oss-provider-app-server-config
May 25, 2026
Merged

TUI config cleanup: oss_provider#24254
etraut-openai merged 2 commits into
mainfrom
etraut/oss-provider-app-server-config

Conversation

@etraut-openai

@etraut-openai etraut-openai commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Manual provider selection during codex --oss startup was still persisting oss_provider through the legacy local config.toml writer. That bypasses the app-server-owned config mutation path used by the TUI, so this routes the write through the app server config API instead.

The net behavior is intentionally narrow: only an interactive picker selection is persisted. Auto-detected single-running-provider startup and explicit --local-provider startup remain ephemeral, so merely having one backend running does not make that provider sticky for future runs.

What Changed

  • Removed the TUI picker’s direct dependency on set_default_oss_provider.
  • Had oss_selection report whether the returned provider came from the interactive picker.
  • Carried only manually selected providers into startup persistence.
  • Wrote oss_provider via config/batchWrite once the app server session is available.
  • Logged a warning and continued startup if the app-server config write fails.

Verification

Manually smoke-tested the real codex-tui binary with a temporary CODEX_HOME, pseudo-terminal input, and a fake LM Studio HTTP server:

  • Interactive picker selection persisted oss_provider = "lmstudio".
  • Non-picker --local-provider lmstudio startup did not persist oss_provider.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8c6e98a0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/lib.rs Outdated
@etraut-openai etraut-openai force-pushed the etraut/oss-provider-app-server-config branch from b8c6e98 to 55275ca Compare May 23, 2026 18:38
@etraut-openai etraut-openai changed the title [codex] Route TUI OSS provider persistence through app server [codex] Persist TUI OSS provider via app server config API May 23, 2026
@etraut-openai etraut-openai changed the title [codex] Persist TUI OSS provider via app server config API Persist TUI OSS provider via app server config API May 23, 2026
@etraut-openai etraut-openai changed the title Persist TUI OSS provider via app server config API TUI config cleanup: oss_provider May 24, 2026

@fcoury-oai fcoury-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Smoke tested and code looks good 👍

@etraut-openai etraut-openai merged commit f05fd0e into main May 25, 2026
31 of 32 checks passed
@etraut-openai etraut-openai deleted the etraut/oss-provider-app-server-config branch May 25, 2026 16:53
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants