mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 18:04:41 +00:00
fix(ai): filter deprecated OpenCode models from generation (#970)
Add status === 'deprecated' check for OpenCode Zen models, matching the existing pattern used for GitHub Copilot models. This removes deprecated models like glm-4.7-free and minimax-m2.1-free from the generated model catalog.
This commit is contained in:
parent
a5f603d704
commit
9f3eef65f8
2 changed files with 4 additions and 54 deletions
|
|
@ -482,8 +482,9 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
|||
// - null/undefined/@ai-sdk/openai-compatible → openai-completions
|
||||
if (data.opencode?.models) {
|
||||
for (const [modelId, model] of Object.entries(data.opencode.models)) {
|
||||
const m = model as ModelsDevModel;
|
||||
const m = model as ModelsDevModel & { status?: string };
|
||||
if (m.tool_call !== true) continue;
|
||||
if (m.status === "deprecated") continue;
|
||||
|
||||
const npm = m.provider?.npm;
|
||||
let api: Api;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue