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:
@@ -48,6 +48,22 @@ describe("ocg/muse-spark-1.3-contributor catalog", () => {
|
||||
});
|
||||
|
||||
describe("OpenCodeGoExecutor routing + sanitization", () => {
|
||||
it("routes gpt-5.6-luna to /responses", () => {
|
||||
const ex = new OpenCodeGoExecutor();
|
||||
expect(ex.buildUrl("gpt-5.6-luna")).toBe("https://opencode.ai/zen/go/v1/responses");
|
||||
expect(ex.buildUrl("gpt-5.6-luna(high)", true, 0, {
|
||||
runtimeTransport: { baseUrl: "https://opencode.ai/zen/go/v1/chat/completions" },
|
||||
})).toBe("https://opencode.ai/zen/go/v1/responses");
|
||||
});
|
||||
|
||||
it("routes every responses-only registry model (grok-4.6) to /responses", () => {
|
||||
const ex = new OpenCodeGoExecutor();
|
||||
expect(ex.buildUrl("grok-4.6")).toBe("https://opencode.ai/zen/go/v1/responses");
|
||||
expect(ex.buildUrl("grok-4.6(high)", true, 0, {
|
||||
runtimeTransport: { baseUrl: "https://opencode.ai/zen/go/v1/chat/completions" },
|
||||
})).toBe("https://opencode.ai/zen/go/v1/responses");
|
||||
});
|
||||
|
||||
it("is wired for opencode-go and routes muse-spark to /responses", () => {
|
||||
expect(getExecutor("opencode-go")).toBeInstanceOf(OpenCodeGoExecutor);
|
||||
const ex = new OpenCodeGoExecutor();
|
||||
|
||||
Reference in New Issue
Block a user