Skip to content

Commit 8b0fb83

Browse files
committed
refactor(models): decorate owned catalog rows in place
1 parent 19083a6 commit 8b0fb83

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎extensions/baseten/models.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,7 @@ export function buildStaticBasetenModels(): ModelDefinitionConfig[] {
111111
return buildManifestModelProviderConfig({
112112
providerId: "baseten",
113113
catalog: BASETEN_MANIFEST_CATALOG,
114-
}).models.map((normalized) => ({
115-
...normalized,
116-
compat: buildBasetenModelCompat(normalized.id),
117-
}));
114+
}).models.map((model) => Object.assign(model, { compat: buildBasetenModelCompat(model.id) }));
118115
}
119116

120117
type BasetenLiveModelRow = {

‎extensions/deepseek/models.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const DEEPSEEK_BASE_URL = DEEPSEEK_MANIFEST_CATALOG.baseUrl;
99
export const DEEPSEEK_MODEL_CATALOG: ModelDefinitionConfig[] = buildManifestModelProviderConfig({
1010
providerId: "deepseek",
1111
catalog: DEEPSEEK_MANIFEST_CATALOG,
12-
}).models.map((model) => ({ ...model, api: "openai-completions" }));
12+
}).models.map((model) => Object.assign(model, { api: "openai-completions" }));
1313

1414
const DEEPSEEK_V4_MODEL_IDS = new Set(["deepseek-v4-flash", "deepseek-v4-pro"]);
1515

‎extensions/tencent/models.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const TOKENHUB_MANIFEST_CATALOG = manifest.modelCatalog.providers[TOKENHUB_PROVI
1313
export const TOKENHUB_MODEL_CATALOG: ModelDefinitionConfig[] = buildManifestModelProviderConfig({
1414
providerId: TOKENHUB_PROVIDER_ID,
1515
catalog: TOKENHUB_MANIFEST_CATALOG,
16-
}).models.map((model) => ({ ...model, api: "openai-completions" }));
16+
}).models.map((model) => Object.assign(model, { api: "openai-completions" }));
1717

1818
// ---------- TokenPlan provider ----------
1919

@@ -25,4 +25,4 @@ const TOKENPLAN_MANIFEST_CATALOG = manifest.modelCatalog.providers[TOKENPLAN_PRO
2525
export const TOKENPLAN_MODEL_CATALOG: ModelDefinitionConfig[] = buildManifestModelProviderConfig({
2626
providerId: TOKENPLAN_PROVIDER_ID,
2727
catalog: TOKENPLAN_MANIFEST_CATALOG,
28-
}).models.map((model) => ({ ...model, api: "openai-completions" }));
28+
}).models.map((model) => Object.assign(model, { api: "openai-completions" }));

‎extensions/together/models.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export const TOGETHER_BASE_URL = TOGETHER_MANIFEST_CATALOG.baseUrl;
99
export const TOGETHER_MODEL_CATALOG: ModelDefinitionConfig[] = buildManifestModelProviderConfig({
1010
providerId: "together",
1111
catalog: TOGETHER_MANIFEST_CATALOG,
12-
}).models.map((model) => ({ ...model, api: "openai-completions" }));
12+
}).models.map((model) => Object.assign(model, { api: "openai-completions" }));

0 commit comments

Comments
 (0)