muse-spark-1.2-contributor-free returned HTTP 500 on /zen/v1/chat/completions.
The model is only served by /zen/v1/responses, so route it there via a per-model
targetFormat and normalize the Chat fields the Responses API rejects
(max_tokens -> max_output_tokens, reasoning_effort -> reasoning{effort,summary}),
clamping max/ultra down to the highest effort the model accepts (xhigh).
Routing stays per-model: the other free models (big-pickle, hy3-free, mimo,
nemotron, laguna) are not served by /responses and keep /chat/completions.
30 lines
787 B
JavaScript
30 lines
787 B
JavaScript
export default {
|
|
id: "opencode",
|
|
priority: 40,
|
|
hasFree: true,
|
|
alias: "oc",
|
|
uiAlias: "oc",
|
|
display: {
|
|
name: "OpenCode Free",
|
|
icon: "terminal",
|
|
color: "#E87040",
|
|
textIcon: "OC",
|
|
},
|
|
category: "free",
|
|
noAuth: true,
|
|
transport: {
|
|
baseUrl: "https://opencode.ai",
|
|
headers: {
|
|
"x-opencode-client": "desktop",
|
|
},
|
|
noAuth: true,
|
|
},
|
|
models: [
|
|
// Only this model is served by /zen/v1/responses; the rest stay on
|
|
// /chat/completions, so the format is declared per-model, not per-provider.
|
|
{ id: "muse-spark-1.2-contributor-free", name: "Muse Spark 1.2 Contributor Free", targetFormat: "openai-responses" },
|
|
],
|
|
modelsFetcher: { url: "https://opencode.ai/zen/v1/models", type: "opencode-free" },
|
|
passthroughModels: true,
|
|
};
|