Files
9router/open-sse/providers/registry/opencode.js
T
Hermes Agent 2b65c49ff5 fix(opencode): route Union Alpha through Messages API
Route union-alpha to /zen/v1/messages with targetFormat claude, add anthropic-version header, and register model capabilities (vision, 262K context, 131K max output).
2026-09-17 18:01:43 +07:00

31 lines
914 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: [
// Endpoint formats differ per model, so declare non-chat models explicitly.
{ id: "muse-spark-1.2-contributor-free", name: "Muse Spark 1.2 Contributor Free", targetFormat: "openai-responses" },
{ id: "muse-spark-1.3-contributor-free", name: "Muse Spark 1.3 Contributor Free", targetFormat: "openai-responses" },
{ id: "union-alpha", name: "Union Alpha Free", targetFormat: "claude" },
],
modelsFetcher: { url: "https://opencode.ai/zen/v1/models", type: "opencode-free" },
passthroughModels: true,
};