Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(opencode): loosen Cohere North model match
  • Loading branch information
rekram1-node committed Jun 9, 2026
commit e2999e0779e4846b8cdd2a9681065b326594f808
4 changes: 2 additions & 2 deletions packages/opencode/src/provider/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
case "venice-ai-sdk-provider":
// https://docs.venice.ai/overview/guides/reasoning-models#reasoning-effort
case "@ai-sdk/openai-compatible":
if (model.api.id.toLowerCase() === "north-mini-code-1-0") {
if (model.api.id.toLowerCase().includes("north-mini-code")) {
return Object.fromEntries(
["none", "high"].map((effort) => [effort, { reasoningEffort: effort }]),
)
Expand Down Expand Up @@ -1110,7 +1110,7 @@ export function options(input: {
}

const modelId = input.model.api.id.toLowerCase()
if (modelId === "north-mini-code-1-0" && input.model.api.npm === "@ai-sdk/openai-compatible") {
if (modelId.includes("north-mini-code") && input.model.api.npm === "@ai-sdk/openai-compatible") {
result["citation_options"] = { mode: "off" }
}

Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/test/provider/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,7 @@ describe("ProviderTransform.options - Cohere North", () => {
id: "cohere/north-mini-code-1-0",
providerID: "cohere",
api: {
id: "north-mini-code-1-0",
id: "North-Mini-Code-1-0-latest",
url: "https://api.cohere.com/compatibility/v1",
npm: "@ai-sdk/openai-compatible",
},
Expand Down Expand Up @@ -3234,7 +3234,7 @@ describe("ProviderTransform.variants", () => {
id: "cohere/north-mini-code-1-0",
providerID: "cohere",
api: {
id: "north-mini-code-1-0",
id: "North-Mini-Code-1-0-latest",
url: "https://api.cohere.com/compatibility/v1",
npm: "@ai-sdk/openai-compatible",
},
Expand Down
Loading