From 707f7884abda6664d41b014d7b283ecc5c027ad2 Mon Sep 17 00:00:00 2001 From: Minxi Hou Date: Tue, 29 Sep 2026 22:44:09 -0400 Subject: [PATCH 1/2] fix(models): accept "responses" as a supported endpoint Codex model discovery sets supportedEndpoints to ["responses"] for every model it imports, but the validation schema rejected that value. Adding it to the allowed list lets gpt-6.1-sol and other Codex models import without a schema error. Signed-off-by: Minxi Hou --- src/shared/constants/modelSupportedEndpoints.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/constants/modelSupportedEndpoints.ts b/src/shared/constants/modelSupportedEndpoints.ts index 14aa2b3b35d2..d77517f4fbaf 100644 --- a/src/shared/constants/modelSupportedEndpoints.ts +++ b/src/shared/constants/modelSupportedEndpoints.ts @@ -1,5 +1,6 @@ export const MODEL_SUPPORTED_ENDPOINT_VALUES = [ "chat", + "responses", "embeddings", "rerank", "images", @@ -37,6 +38,8 @@ export function classifyModelSupportedEndpoints(endpoints: readonly string[]): { type?: "embedding" | "rerank" | "image" | "video" | "audio"; subtype?: "speech" | "transcription"; } { + // "chat" and "responses" are text-conversation endpoints; they carry no + // modality type, so they fall through to the empty return below. if (endpoints.includes("embeddings")) return { type: "embedding" }; if (endpoints.includes("rerank")) return { type: "rerank" }; if (endpoints.includes("images")) return { type: "image" }; From fd6298b9301a077383a35924f917c094654107a9 Mon Sep 17 00:00:00 2001 From: Minxi Hou Date: Fri, 2 Oct 2026 01:48:22 -0300 Subject: [PATCH 2/2] test(models): cover responses as an accepted supported endpoint Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --- tests/unit/model-supported-endpoints.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/unit/model-supported-endpoints.test.ts b/tests/unit/model-supported-endpoints.test.ts index 30d93f67fc43..fb4fb51233c9 100644 --- a/tests/unit/model-supported-endpoints.test.ts +++ b/tests/unit/model-supported-endpoints.test.ts @@ -6,6 +6,7 @@ import { MODEL_SUPPORTED_ENDPOINT_VALUES, normalizeModelSupportedEndpoints, } from "../../src/shared/constants/modelSupportedEndpoints.ts"; +import { providerModelMutationSchema } from "../../src/shared/validation/schemas/provider.ts"; test("normalizes legacy video and audio metadata to operation-specific endpoint ids", () => { assert.deepEqual(normalizeModelSupportedEndpoints(["chat", "video", "audio"]), [ @@ -56,3 +57,18 @@ test("classifies operation-specific media endpoints for the model catalog", () = type: "audio", }); }); + +test("accepts the responses endpoint emitted by Codex discovery", () => { + assert.ok(MODEL_SUPPORTED_ENDPOINT_VALUES.includes("responses")); + assert.deepEqual(normalizeModelSupportedEndpoints(["responses"]), ["responses"]); + // A responses-only model is a plain chat-type model: no media type override. + assert.deepEqual(classifyModelSupportedEndpoints(["responses"]), {}); + + const parsed = providerModelMutationSchema.safeParse({ + provider: "codex", + modelId: "gpt-6-sol", + supportedEndpoints: ["responses"], + }); + assert.equal(parsed.success, true); + assert.deepEqual(parsed.success && parsed.data.supportedEndpoints, ["responses"]); +});