feat(web): add default model and provider settings#1219
feat(web): add default model and provider settings#1219binbandit wants to merge 3 commits intopingdotgg:mainfrom
Conversation
Add `defaultModel` and `defaultProvider` fields to app settings so users can configure the model and provider used for new threads and projects when no thread-specific or project-level override is set. - Add `defaultProvider` (optional ProviderKind) and `defaultModel` (optional TrimmedNonEmptyString) to the AppSettings schema - Wire settings into the ChatView provider/model selection hierarchy: draft → thread → project → settings default → built-in default - Update Sidebar project creation to propagate the default model into new projects so the setting takes effect immediately - Add draft-thread model fallback through settings default - Add "Defaults" section to Settings page with model dropdown (provider dropdown conditionally rendered when >1 providers available) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The useCallback for addProjectFromPath captured appSettings.defaultModel but omitted it from the dependency array, causing a stale closure when the setting changed without a re-render triggered by defaultThreadEnvMode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
#1121 serves the same purpose in a more frictionless way |
|
sure, lets close this then |
Summary
defaultProvideranddefaultModeloptional fields to theAppSettingsschema so users can configure the model and provider used for new threads and projectsuseMemodependency array to include the settings defaultDesign decisions
Schema.optional, ensuring backward compatibility with existing persisted settings (no migration needed)>1providers are marked asavailableinPROVIDER_OPTIONS— currently only Codex is available, so the dropdown is hidden until more providers shipSidebar.tsxusesappSettings.defaultModel ?? DEFAULT_MODEL_BY_PROVIDER.codexso that new projects inherit the user's preferred model — without this,activeProject.modelwould always be"gpt-5.4"and the settings default would be unreachableUI
Test plan
tsc --noEmit)appSettings,model,store,session-logic,composerDraftStore/modelcommand still works correctly to override the default per-thread🤖 Generated with Claude Code
Note
Add default provider and model settings to the web app
defaultProvideranddefaultModelfields in the app settings schema.appSettings.defaultModelas the default model when creating new projects.Macroscope summarized aec0916.