Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions open-sse/config/providers/registry/opencode/zen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ export const opencode_zenProvider: RegistryEntry = {
...OPENCODE_ZEN_GO_SHARED_MODELS,
// models[0] (big-pickle) is the dashboard default; SHARED spread kept after it.

{ id: "gpt-5.6-sol", name: "GPT 5.6 Sol" },
{ id: "gpt-5.6-terra", name: "GPT 5.6 Terra" },
{ id: "gpt-5.6-luna", name: "GPT 5.6 Luna" },
// #14229: OpenCode Zen serves the GPT-5.6 family through /responses,
// not /chat/completions. Without this declaration the executor builds the
// wrong upstream URL and returns HTTP 503 "Endpoint is unavailable".
{ id: "gpt-5.6-sol", name: "GPT 5.6 Sol", targetFormat: "openai-responses" },
{ id: "gpt-5.6-terra", name: "GPT 5.6 Terra", targetFormat: "openai-responses" },
{ id: "gpt-5.6-luna", name: "GPT 5.6 Luna", targetFormat: "openai-responses" },
{ id: "gpt-5.4", name: "GPT 5.4" },
{ id: "gpt-5.4-mini", name: "GPT 5.4 Mini" },
{ id: "gpt-5.4-nano", name: "GPT 5.4 Nano" },
Expand Down
24 changes: 24 additions & 0 deletions tests/unit/opencode-zen-gpt56-responses-14229.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import assert from "node:assert/strict";
import test from "node:test";

import { opencode_zenProvider } from "../../open-sse/config/providers/registry/opencode/zen/index.ts";
import { resolveOpencodeTargetFormat } from "../../open-sse/executors/opencode.ts";

const GPT56_MODELS = ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];

test("opencode-zen GPT-5.6 models use the Responses API", () => {
const models = new Map((opencode_zenProvider.models ?? []).map((model) => [model.id, model]));

for (const modelId of GPT56_MODELS) {
assert.equal(
models.get(modelId)?.targetFormat,
"openai-responses",
`${modelId} must declare the Responses API wire format`
);
assert.equal(
resolveOpencodeTargetFormat("opencode-zen", modelId),
"openai-responses",
`${modelId} must resolve to the Responses API through the public provider alias`
);
}
});
Loading