refactor(core): scope variant id string to its branch

This commit is contained in:
Kit Langton
2026-06-28 13:37:00 -04:00
parent 7c4c4c7239
commit ce0b726758
+1 -1
View File
@@ -29,9 +29,9 @@ export const Plugin = define({
export function generate(model: ModelV2Info): ModelV2Info["variants"] {
if (model.api.type !== "aisdk") return []
const ids = `${model.id} ${model.api.id}`.toLowerCase()
if (model.api.package === "@ai-sdk/openai-compatible") {
const ids = `${model.id} ${model.api.id}`.toLowerCase()
if (["glm-5.2", "glm-5-2", "glm-5p2"].some((name) => ids.includes(name)))
return ["high", "max"].map((id) => ({
id,