From 861b90f79c6833e97e4f91f5e97541a47da5c02a Mon Sep 17 00:00:00 2001 From: AytuncYildizli Date: Thu, 26 Feb 2026 15:15:06 +0300 Subject: [PATCH] fix(config): add openai-codex-responses to ModelApiSchema The config schema validates provider api fields against ModelApiSchema, but openai-codex-responses was missing from the allowed values. This forces users to set api: "openai-responses" for the openai-codex provider, which routes requests to api.openai.com/v1/responses instead of chatgpt.com/backend-api/codex/responses, causing HTTP 401 errors because Codex OAuth tokens lack api.responses.write scope for the standard OpenAI Responses endpoint. The runtime already supports openai-codex-responses throughout: model registry, stream dispatch (streamOpenAICodexResponses), and provider detection (OPENAI_MODEL_APIS set). Only the config schema was missing the literal. --- src/config/zod-schema.core.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/zod-schema.core.ts b/src/config/zod-schema.core.ts index df330b88901..70396b3109e 100644 --- a/src/config/zod-schema.core.ts +++ b/src/config/zod-schema.core.ts @@ -182,6 +182,7 @@ export const SecretsConfigSchema = z export const ModelApiSchema = z.union([ z.literal("openai-completions"), z.literal("openai-responses"), + z.literal("openai-codex-responses"), z.literal("anthropic-messages"), z.literal("google-generative-ai"), z.literal("github-copilot"),