From cc8864dc1f049d617b13bbbe973901304b210115 Mon Sep 17 00:00:00 2001 From: Nikolas de Hor Date: Sat, 28 Feb 2026 01:01:20 -0300 Subject: [PATCH] fix: remove overly broad "codex" keyword from openai_codex provider The bare keyword "codex" causes false positive matches when any model name happens to contain "codex" (e.g. "gpt-5.3-codex" on a custom provider). This incorrectly routes the request through the OAuth-based OpenAI Codex provider, producing "OAuth credentials not found" errors even when a valid custom api_key and api_base are configured. Keep only the explicit "openai-codex" keyword so that auto-detection requires the canonical prefix. Users can still set provider: "custom" to force the custom endpoint, but auto-detection should not collide. Closes #1311 --- nanobot/providers/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanobot/providers/registry.py b/nanobot/providers/registry.py index 2766929..df915b7 100644 --- a/nanobot/providers/registry.py +++ b/nanobot/providers/registry.py @@ -201,7 +201,7 @@ PROVIDERS: tuple[ProviderSpec, ...] = ( # OpenAI Codex: uses OAuth, not API key. ProviderSpec( name="openai_codex", - keywords=("openai-codex", "codex"), + keywords=("openai-codex",), env_key="", # OAuth-based, no API key display_name="OpenAI Codex", litellm_prefix="", # Not routed through LiteLLM