fix(opencode-go): route every responses-only model (incl. thinking variants) to /responses
Derive responses-only routing from the model registry's targetFormat instead of hardcoding model checks, and strip thinking suffixes when looking up models in providerModels so variants like gpt-5.6-luna(high) are routed correctly to /responses.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { PROVIDER_MODELS, getModelSupportedFormats } from "../../open-sse/config/providerModels.js";
|
||||
import { PROVIDER_MODELS, getModelSupportedFormats, getModelTargetFormat } from "../../open-sse/config/providerModels.js";
|
||||
import { PROVIDERS } from "../../open-sse/config/providers.js";
|
||||
import { resolveTransport } from "../../open-sse/services/provider.js";
|
||||
|
||||
@@ -37,6 +37,18 @@ describe("OpenCode Go model catalog", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("OpenCode Go thinking-suffix model lookup", () => {
|
||||
it("preserves Responses routing for gpt-5.6-luna thinking variants", () => {
|
||||
expect(getModelSupportedFormats("opencode-go", "gpt-5.6-luna(high)")).toEqual(["openai-responses"]);
|
||||
expect(getModelTargetFormat("opencode-go", "gpt-5.6-luna(high)")).toBe("openai-responses");
|
||||
});
|
||||
|
||||
it("preserves Responses routing for grok-4.6 thinking variants", () => {
|
||||
expect(getModelSupportedFormats("opencode-go", "grok-4.6(high)")).toEqual(["openai-responses"]);
|
||||
expect(getModelTargetFormat("opencode-go", "grok-4.6(high)")).toBe("openai-responses");
|
||||
});
|
||||
});
|
||||
|
||||
describe("OpenCode Go per-model supportedFormats", () => {
|
||||
it("declares [openai, claude] for MiniMax + Qwen models", () => {
|
||||
for (const m of CLAUDE_CAPABLE) {
|
||||
|
||||
Reference in New Issue
Block a user