mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-23 07:32:20 +03:00
OpenCode Zen serves muse-spark-1.2 and muse-spark-1.2-contributor-free only on the OpenAI Responses API endpoint, not /chat/completions. Declares targetFormat: "openai-responses" for both so requests route correctly instead of returning null/empty content. Closes #10867. Validated in an isolated worktree boarded onto origin/release/v3.8.50 (0 conflicts, 1 file): - Added a TDD regression test (tests/unit/opencode-muse-spark-responses-10867.test.ts) since the PR had none — confirmed RED against origin/release/v3.8.50 (entries absent) and GREEN on this branch, pushed fix-in-place. - check-file-size, check-changelog-integrity: OK. - typecheck:core: clean. - check-complexity / check-cognitive-complexity: OK, both under baseline. Co-authored-by: zoser69 <zoser69@users.noreply.github.com>
21 lines
992 B
TypeScript
21 lines
992 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { opencodeProvider } from "../../open-sse/config/providers/registry/opencode/index.ts";
|
|
|
|
// #10867: Muse Spark is served by OpenCode Zen only on the OpenAI Responses API
|
|
// (/responses), not /chat/completions. Without targetFormat:"openai-responses"
|
|
// these models fall through to the default chat/completions pass-through and the
|
|
// upstream returns null/empty content.
|
|
test("muse-spark-1.2 and muse-spark-1.2-contributor-free route to the Responses API", () => {
|
|
for (const id of ["muse-spark-1.2", "muse-spark-1.2-contributor-free"]) {
|
|
const model = opencodeProvider.models.find((m) => m.id === id);
|
|
assert.ok(model, `${id} should be registered in the opencode provider`);
|
|
assert.equal(
|
|
model?.targetFormat,
|
|
"openai-responses",
|
|
`${id} must target the Responses API, not the default chat/completions pass-through`
|
|
);
|
|
assert.equal(model?.supportsReasoning, true);
|
|
}
|
|
});
|