mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-24 09:18:27 +00:00
# Add configurable verbosity for OpenAI Responses API Fixes #2775 ## Problem Models like `gpt-5.2-codex` and other newer OpenAI models only support `medium` reasoning and verbosity levels, but the codebase was using `low` by default. This caused 400 Bad Request errors: ``` Failed to stream openai-responses chat: openai 400 Bad Request: Unsupported value: 'low' is not supported with the 'gpt-5.2-codex' model. Supported values are: 'medium'. ``` ## Solution This PR implements a scalable, user-configurable approach instead of hardcoding model-specific constraints: 1. **Changed default verbosity** from `"low"` to `"medium"` - more widely supported across OpenAI models 2. **Added `ai:verbosity` config option** - allows users to configure verbosity per model in `waveai.json` 3. **Changed rate limit fallback** from `low` to `medium` thinking level for better compatibility 4. **Removed hardcoded model checks** - solution is scalable for future models ## Changes ### Backend Changes - `pkg/aiusechat/openai/openai-convertmessage.go` - Use configurable verbosity with safe defaults - `pkg/aiusechat/uctypes/uctypes.go` - Add `Verbosity` field to `AIOptsType` - `pkg/aiusechat/usechat.go` - Pass verbosity from config to options - `pkg/wconfig/settingsconfig.go` - Add `Verbosity` to `AIModeConfigType` ### Schema Changes - `schema/waveai.json` - Add `ai:verbosity` with enum values (low/medium/high) - `frontend/types/gotypes.d.ts` - Auto-generated TypeScript types ### Configuration Example Users can now configure both thinking level and verbosity per model: ```json { "openai-gpt52-codex": { "display:name": "GPT-5.2 Codex", "ai:provider": "openai", "ai:model": "gpt-5.2-codex", "ai:thinkinglevel": "medium", "ai:verbosity": "medium" } } ``` |
||
|---|---|---|
| .. | ||
| aipresets.json | ||
| bgpresets.json | ||
| connections.json | ||
| settings.json | ||
| waveai.json | ||
| widgets.json | ||