fix: resolve Codex provider bugs and simplify implementation

This commit is contained in:
Re-bin
2026-02-16 11:43:36 +00:00
parent 9e5f7348fe
commit 1ce586e9f5
5 changed files with 65 additions and 52 deletions

View File

@@ -290,10 +290,7 @@ def _make_provider(config: Config):
# OpenAI Codex (OAuth): don't route via LiteLLM; use the dedicated implementation.
if provider_name == "openai_codex" or model.startswith("openai-codex/"):
return OpenAICodexProvider(
default_model=model,
api_base=p.api_base if p else None,
)
return OpenAICodexProvider(default_model=model)
if not model.startswith("bedrock/") and not (p and p.api_key):
console.print("[red]Error: No API key configured.[/red]")