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:
Jason
2026-02-04 21:19:13 +08:00
parent 52db7941ea
commit 47f2c47a2f
9 changed files with 595 additions and 21 deletions
+14
View File
@@ -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 结构)