diff --git a/aiprompts/config-system.md b/aiprompts/config-system.md index 92373b5a25..d264e1f7f3 100644 --- a/aiprompts/config-system.md +++ b/aiprompts/config-system.md @@ -41,6 +41,7 @@ waveterm/ ``` **Key Files:** + - **[`pkg/wconfig/settingsconfig.go`](pkg/wconfig/settingsconfig.go)** - Defines the `SettingsType` struct with all configuration fields - **[`schema/settings.json`](schema/settings.json)** - JSON Schema for validation and type checking - **[`pkg/wconfig/defaultconfig/settings.json`](pkg/wconfig/defaultconfig/settings.json)** - Default values for all settings @@ -65,10 +66,12 @@ Wave Terminal supports block-level configuration overrides through the metadata 3. **Block Metadata** - Override settings for individual blocks **Key Files for Block Overrides:** + - **[`pkg/waveobj/wtypemeta.go`](pkg/waveobj/wtypemeta.go)** - Defines the `MetaTSType` struct for block-level metadata - Block metadata fields should match the corresponding settings fields for consistency **Frontend Usage:** + ```typescript // Use getOverrideConfigAtom for hierarchical config resolution const settingValue = useAtomValue(getOverrideConfigAtom(blockId, "namespace:setting")); @@ -77,6 +80,7 @@ const settingValue = useAtomValue(getOverrideConfigAtom(blockId, "namespace:sett ``` **Setting Block Metadata:** + ```bash # Set for current block wsh setmeta namespace:setting=value @@ -143,6 +147,7 @@ type MetaTSType struct { ``` **Block Metadata Guidelines:** + - Use pointer types (`*string`, `*bool`, `*int`, `*float64`) for optional overrides - JSON tags should exactly match the corresponding settings field - This enables the hierarchical config system: block metadata → connection config → global settings @@ -197,7 +202,7 @@ If your setting should have a default value, add it to [`pkg/wconfig/defaultconf ```json { "ai:preset": "ai@global", - "ai:model": "gpt-4o-mini", + "ai:model": "gpt-5-mini", // ... existing defaults ... "mynew:setting": "default value", @@ -239,6 +244,7 @@ task generate ``` Or run them individually: + ```bash # Regenerate JSON schema task build:schema diff --git a/docs/docs/config.mdx b/docs/docs/config.mdx index 2622ddc52a..a5d694d8f6 100644 --- a/docs/docs/config.mdx +++ b/docs/docs/config.mdx @@ -100,8 +100,8 @@ For reference, this is the current default configuration (v0.11.5): ```json { "ai:preset": "ai@global", - "ai:model": "gpt-4o-mini", - "ai:maxtokens": 2048, + "ai:model": "gpt-5-mini", + "ai:maxtokens": 4000, "ai:timeoutms": 60000, "app:defaultnewblock": "term", "autoupdate:enabled": true, diff --git a/frontend/app/view/waveai/waveai.tsx b/frontend/app/view/waveai/waveai.tsx index 3c36087cc8..048a76b487 100644 --- a/frontend/app/view/waveai/waveai.tsx +++ b/frontend/app/view/waveai/waveai.tsx @@ -223,7 +223,7 @@ export class WaveAiModel implements ViewModel { viewTextChildren.push({ elemtype: "iconbutton", icon: "cloud", - title: "Using Wave's AI Proxy (gpt-4o-mini)", + title: "Using Wave's AI Proxy (gpt-5-mini)", noAction: true, }); } else { diff --git a/pkg/wconfig/defaultconfig/presets/ai.json b/pkg/wconfig/defaultconfig/presets/ai.json index 11c0b848e9..2b92ed864f 100644 --- a/pkg/wconfig/defaultconfig/presets/ai.json +++ b/pkg/wconfig/defaultconfig/presets/ai.json @@ -5,7 +5,7 @@ "ai:*": true }, "ai@wave": { - "display:name": "Wave Proxy - gpt-4o-mini", + "display:name": "Wave Proxy - gpt-5-mini", "display:order": 0, "ai:*": true, "ai:apitype": "", @@ -13,8 +13,8 @@ "ai:apitoken": "", "ai:name": "", "ai:orgid": "", - "ai:model": "gpt-4o-mini", - "ai:maxtokens": 2048, + "ai:model": "gpt-5-mini", + "ai:maxtokens": 4000, "ai:timeoutms": 60000 } } diff --git a/pkg/wconfig/defaultconfig/settings.json b/pkg/wconfig/defaultconfig/settings.json index 1cfbc13565..2348dd9046 100644 --- a/pkg/wconfig/defaultconfig/settings.json +++ b/pkg/wconfig/defaultconfig/settings.json @@ -1,7 +1,7 @@ { "ai:preset": "ai@global", - "ai:model": "gpt-4o-mini", - "ai:maxtokens": 2048, + "ai:model": "gpt-5-mini", + "ai:maxtokens": 4000, "ai:timeoutms": 60000, "app:defaultnewblock": "term", "autoupdate:enabled": true,