From db7cab4a9a3cf6b2cdf38b0d0486630e8628a28f Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 28 Apr 2026 05:50:19 +0100 Subject: [PATCH] fix: simplify volc catalog model builders --- extensions/byteplus/models.ts | 7 +------ extensions/volcengine/models.ts | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/extensions/byteplus/models.ts b/extensions/byteplus/models.ts index f400541849a..85773e3fa94 100644 --- a/extensions/byteplus/models.ts +++ b/extensions/byteplus/models.ts @@ -29,12 +29,7 @@ export const BYTEPLUS_MODEL_CATALOG: ModelDefinitionConfig[] = BYTEPLUS_MANIFEST export const BYTEPLUS_CODING_MODEL_CATALOG: ModelDefinitionConfig[] = BYTEPLUS_CODING_MANIFEST_PROVIDER.models; -export type BytePlusCatalogEntry = (typeof BYTEPLUS_MODEL_CATALOG)[number]; -export type BytePlusCodingCatalogEntry = (typeof BYTEPLUS_CODING_MODEL_CATALOG)[number]; - -export function buildBytePlusModelDefinition( - entry: BytePlusCatalogEntry | BytePlusCodingCatalogEntry, -): ModelDefinitionConfig { +export function buildBytePlusModelDefinition(entry: ModelDefinitionConfig): ModelDefinitionConfig { return { ...entry, input: [...entry.input], diff --git a/extensions/volcengine/models.ts b/extensions/volcengine/models.ts index e4f4d6d0b93..3ea4085c0ba 100644 --- a/extensions/volcengine/models.ts +++ b/extensions/volcengine/models.ts @@ -29,12 +29,7 @@ export const DOUBAO_MODEL_CATALOG: ModelDefinitionConfig[] = DOUBAO_MANIFEST_PRO export const DOUBAO_CODING_MODEL_CATALOG: ModelDefinitionConfig[] = DOUBAO_CODING_MANIFEST_PROVIDER.models; -export type DoubaoCatalogEntry = (typeof DOUBAO_MODEL_CATALOG)[number]; -export type DoubaoCodingCatalogEntry = (typeof DOUBAO_CODING_MODEL_CATALOG)[number]; - -export function buildDoubaoModelDefinition( - entry: DoubaoCatalogEntry | DoubaoCodingCatalogEntry, -): ModelDefinitionConfig { +export function buildDoubaoModelDefinition(entry: ModelDefinitionConfig): ModelDefinitionConfig { return { ...entry, input: [...entry.input],