Provider: clean up Chutes integration for merge compatibility

This commit is contained in:
Veightor 2026-01-26 16:04:41 -05:00
parent dfc5e58a0f
commit 1c4c0f5525
2 changed files with 12 additions and 11 deletions

View File

@ -78,8 +78,19 @@ export function toModelRow(params: {
cfg && authStore
? hasAuthForProvider(model.provider, cfg, authStore)
: (availableKeys?.has(modelKey(model.provider, model.id)) ?? false);
const aliasTags = aliases.length > 0 ? [`alias:${aliases.join(",")}`] : [];
const mergedTags = new Set(tags);
const cost = (model as any).cost;
if (cost && (cost.input > 0 || cost.output > 0)) {
mergedTags.add(`cost:${cost.input}/${cost.output}`);
}
if ((model as any).confidentialCompute) {
mergedTags.add("TEE");
}
const aliasTags = aliases.length > 0 ? [`alias:${aliases.join(",")}`] : [];
if (aliasTags.length > 0) {
for (const tag of mergedTags) {
if (tag === "alias" || tag.startsWith("alias:")) mergedTags.delete(tag);
@ -94,12 +105,6 @@ export function toModelRow(params: {
contextWindow: model.contextWindow ?? null,
local,
available,
cost: (model as any).cost
? {
input: (model as any).cost.input,
output: (model as any).cost.output,
}
: undefined,
tags: Array.from(mergedTags),
missing: false,
};

View File

@ -42,7 +42,6 @@ export function printModelTable(
pad("Ctx", CTX_PAD),
pad("Local", LOCAL_PAD),
pad("Auth", AUTH_PAD),
pad("Cost (In/Out)", COST_PAD),
"Tags",
].join(" ");
runtime.log(rich ? theme.heading(header) : header);
@ -55,8 +54,6 @@ export function printModelTable(
const localLabel = pad(localText, LOCAL_PAD);
const authText = row.available === null ? "-" : row.available ? "yes" : "no";
const authLabel = pad(authText, AUTH_PAD);
const costText = row.cost ? `${row.cost.input}/${row.cost.output}` : "-";
const costLabel = pad(costText, COST_PAD);
const tagsLabel =
row.tags.length > 0
? rich
@ -86,7 +83,6 @@ export function printModelTable(
ctxLabel,
coloredLocal,
coloredAuth,
costLabel,
tagsLabel,
].join(" ");
runtime.log(line);