refactor(providers): hide oauth-only providers from config setup

Exclude openai_codex alongside github_copilot from generated config,
filter OAuth-only providers out of the onboarding wizard, and clarify in
README that OAuth login stores session state outside config. Also unify
the GitHub Copilot login command spelling and add regression tests.

Made-with: Cursor
This commit is contained in:
Xubin Ren
2026-03-20 19:19:02 +00:00
committed by Xubin Ren
parent e029d52e70
commit 32f4e60145
5 changed files with 18 additions and 4 deletions

View File

@@ -664,6 +664,7 @@ def _get_provider_info() -> dict[str, tuple[str, bool, bool, str]]:
spec.default_api_base,
)
for spec in PROVIDERS
if not spec.is_oauth
}

View File

@@ -78,7 +78,7 @@ class ProvidersConfig(Base):
volcengine_coding_plan: ProviderConfig = Field(default_factory=ProviderConfig) # VolcEngine Coding Plan
byteplus: ProviderConfig = Field(default_factory=ProviderConfig) # BytePlus (VolcEngine international)
byteplus_coding_plan: ProviderConfig = Field(default_factory=ProviderConfig) # BytePlus Coding Plan
openai_codex: ProviderConfig = Field(default_factory=ProviderConfig) # OpenAI Codex (OAuth)
openai_codex: ProviderConfig = Field(default_factory=ProviderConfig, exclude=True) # OpenAI Codex (OAuth)
github_copilot: ProviderConfig = Field(default_factory=ProviderConfig, exclude=True) # Github Copilot (OAuth)