mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 07:04:25 +00:00
fix: use consistent model comparison including provider
This commit is contained in:
parent
64e7c80c7e
commit
a7efe3d4c1
5 changed files with 25 additions and 17 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
|
||||
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import type { Api, KnownProvider, Model } from "@mariozechner/pi-ai";
|
||||
import { type Api, type KnownProvider, type Model, modelsAreEqual } from "@mariozechner/pi-ai";
|
||||
import chalk from "chalk";
|
||||
import { isValidThinkingLevel } from "../cli/args.js";
|
||||
import type { ModelRegistry } from "./model-registry.js";
|
||||
|
|
@ -184,7 +184,7 @@ export async function resolveModelScope(patterns: string[], modelRegistry: Model
|
|||
}
|
||||
|
||||
// Avoid duplicates
|
||||
if (!scopedModels.find((sm) => sm.model.id === model.id && sm.model.provider === model.provider)) {
|
||||
if (!scopedModels.find((sm) => modelsAreEqual(sm.model, model))) {
|
||||
scopedModels.push({ model, thinkingLevel });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue