Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(ai-gateway): stop advertising gpt-5.3-codex, unservable via chat completions (#5654)

Ansh Grover47929762a1c4
diff --git a/packages/ai-gateway/src/handlers/models.ts b/packages/ai-gateway/src/handlers/models.ts
index 1b729cb53..87790a161 100644
--- a/packages/ai-gateway/src/handlers/models.ts
+++ b/packages/ai-gateway/src/handlers/models.ts
@@ -194,23 +194,10 @@ const CURATED_MODELS: ModelEntry[] = [
warning: 'very expensive — avoid for pipes unless the task truly needs pro-level accuracy',
requires_env: 'OPENAI_API_KEY',
},
- {
- id: 'gpt-5.3-codex',
- object: 'model',
- owned_by: 'openai',
- name: 'GPT-5.3 Codex',
- description: 'openai coding specialist for agentic code changes and long-horizon engineering tasks',
- tags: ['premium', 'coding', 'agentic', 'vision'],
- free: false,
- context_window: 400000,
- best_for: ['agentic coding', 'code review', 'large refactors', 'debugging'],
- speed: 'medium',
- intelligence: 'highest',
- cost_tier: 'medium',
- recommended_for: ['coding', 'analysis'],
- warning: 'coding-specialized model — use gpt-5.4-mini or a free model for ordinary chat/pipes',
- requires_env: 'OPENAI_API_KEY',
- },
+ // gpt-5.3-codex is deliberately NOT listed: codex models are served only via
+ // OpenAI's Responses API, and this worker speaks Chat Completions — every
+ // request 404s upstream ("model not found"). Codex stays available through
+ // ChatGPT-subscription connections in the app, which use a different backend.
{
id: 'gpt-5.4-mini',
object: 'model',
diff --git a/packages/ai-gateway/src/test/openai-models.unit.test.ts b/packages/ai-gateway/src/test/openai-models.unit.test.ts
index 3aa8b4a86..c541ce6ed 100644
--- a/packages/ai-gateway/src/test/openai-models.unit.test.ts
+++ b/packages/ai-gateway/src/test/openai-models.unit.test.ts
@@ -50,11 +50,15 @@ describe('OpenAI API model catalog', () => {
expect(ids).toContain('gpt-5.5-pro');
expect(ids).toContain('gpt-5.4');
expect(ids).toContain('gpt-5.4-pro');
- expect(ids).toContain('gpt-5.3-codex');
expect(ids).toContain('gpt-5.4-mini');
expect(ids).toContain('gpt-5.4-nano');
});
+ it('never advertises Responses-API-only codex models (chat-completions 404s them)', async () => {
+ const ids = await listedModelIds();
+ expect(ids).not.toContain('gpt-5.3-codex');
+ });
+
it('hides OpenAI models until OPENAI_API_KEY is configured', async () => {
const ids = await listedModelIds({ OPENAI_API_KEY: '' });