mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
feat(openclaw): add agents.defaults config support
- Add types for default model config (primary + fallbacks) - Add types for model catalog/allowlist with aliases - Extend OpenClawModelEntry with cost and contextWindow fields - Add Tauri commands: get/set_openclaw_default_model, get/set_openclaw_model_catalog - Create frontend API (src/lib/api/openclaw.ts) - Add suggestedDefaults to provider presets with model metadata - Add i18n translations (zh/en/ja) for openclawConfig.*
This commit is contained in:
@@ -434,6 +434,20 @@ export interface OpenCodeMcpServerSpec {
|
||||
export interface OpenClawModel {
|
||||
id: string;
|
||||
name: string;
|
||||
alias?: string;
|
||||
cost?: { input: number; output: number };
|
||||
contextWindow?: number;
|
||||
}
|
||||
|
||||
// OpenClaw 默认模型配置(agents.defaults.model)
|
||||
export interface OpenClawDefaultModel {
|
||||
primary: string;
|
||||
fallbacks?: string[];
|
||||
}
|
||||
|
||||
// OpenClaw 模型目录条目(agents.defaults.models 中的值)
|
||||
export interface OpenClawModelCatalogEntry {
|
||||
alias?: string;
|
||||
}
|
||||
|
||||
// OpenClaw 供应商配置(settings_config 结构)
|
||||
|
||||
Reference in New Issue
Block a user