Skip to content

fix(codex): avoid creating an empty default provider - #527

Open
Charlie-1909 wants to merge 3 commits into
xintaofei:mainfrom
Charlie-1909:fix/codex-empty-provider-520
Open

fix(codex): avoid creating an empty default provider#527
Charlie-1909 wants to merge 3 commits into
xintaofei:mainfrom
Charlie-1909:fix/codex-empty-provider-520

Conversation

@Charlie-1909

Copy link
Copy Markdown
Contributor

Summary

  • avoid writing model_provider or creating [model_providers.codeg] when Codex has neither a configured provider nor a non-empty API base URL
  • preserve an existing provider and honor an explicitly requested provider when a non-empty URL is supplied
  • keep global responses_websockets_v2 handling independent from provider creation
  • apply the same provider-write guard in the TypeScript settings path and the Rust persistence/cascade paths
  • preserve the explicit authentication defaults introduced for Bug: Codex requires_openai_auth = false 会被 Codeg 无条件重置为 true #406

Fixes #520

Local verification

  • targeted Vitest: 109/109 passed
  • targeted ESLint: passed
  • production build: passed
  • full Vitest run: 4,463/4,466 passed locally; the three failures are in unchanged files:
    • one 5-second timeout passed 11/11 when rerun in isolation
    • two locale-sensitive assertions expect 51,777, while the French Windows locale renders 51?777
  • Rust is unavailable in the local environment; this draft PR is opened specifically to run the repository's Rust matrix on Linux, macOS, and Windows

Scope

Only these files differ from main:

  • src/components/settings/acp-agent-settings.tsx
  • src/components/settings/acp-agent-settings.test.tsx
  • src-tauri/src/commands/acp.rs

@Charlie-1909
Charlie-1909 marked this pull request as ready for review August 20, 2026 22:16
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.

Bug: CodeG 向 ~/.codex/config.toml 写入空的 model_providers.codeg,污染原生 Codex App

1 participant