refactor(setting-model): migrate SoMark to generic provider card withmodel-level extra fields (#17582)

This commit is contained in:
chanx
2026-07-31 11:35:35 +08:00
committed by GitHub
parent 2c6da4113d
commit c6f946a562
16 changed files with 453 additions and 807 deletions

View File

@@ -108,6 +108,14 @@ export interface IInstanceModel {
* without relying solely on the (possibly unfetched) catalog.
*/
is_tools?: boolean;
/**
* Per-model extra config persisted in `tenant_model.extra`.
* Carries provider-specific fields such as SoMark's element-format
* selects and feature-config toggles. Echoed back by the backend's
* `_hybrid_get_instance_models` so the frontend can pre-fill the
* edit dialog.
*/
extra?: Record<string, any>;
}
export interface IDefaultModel {

View File

@@ -138,6 +138,13 @@ export interface IProviderModelItem {
max_tokens: number;
model_types: string[];
features: string[] | null;
/**
* Per-model extra config forwarded through `model_info[].extra`
* (e.g. SoMark's element-format / feature-config fields).
* Catalog models typically omit this; it is populated by the
* edit dialog and the `useModelsDerived` echo path.
*/
extra?: Record<string, any>;
}
/**