Skip to content

feat(settings): support named model profiles with /model integration (#204) - #282

Open
innocarpe wants to merge 1 commit into
lessweb:mainfrom
innocarpe:feat/204-model-profiles
Open

feat(settings): support named model profiles with /model integration (#204)#282
innocarpe wants to merge 1 commit into
lessweb:mainfrom
innocarpe:feat/204-model-profiles

Conversation

@innocarpe

Copy link
Copy Markdown

Summary

  • Adds a profiles map (model, baseUrl, apiKey, thinkingEnabled, reasoningEffort, temperature) and an optional defaultProfile to settings.json.
  • The /model dropdown lists saved profiles for one-click switching via writeProfileSelection.
  • The default profile is applied as a fallback when resolving settings (explicit settings/env still win).

Why

Switching between different model configurations (e.g. deepseek-v4-pro with max reasoning for complex tasks, deepseek-v4-flash for quick edits, or third-party endpoints) required re-entering model, thinking mode, effort, and temperature every time. Named profiles make this one click.

Changes

  • packages/core/src/settings.ts: ModelProfile type, profiles/defaultProfile parsing, getModelProfiles(), writeProfileSelection(), default-profile fallback in resolution.
  • packages/core/src/index.ts: export the new helpers.
  • packages/cli/src/ui/components/ModelsDropdown/index.tsx: list profiles in the model step and apply them directly.
  • packages/cli/src/ui/views/PromptInput.tsx + App.tsx: thread modelProfiles / onProfileSelect.
  • Tests: settings-and-notify.test.ts (parsing, fallback, write), exec-runner.test.ts (resolved type).

Validation

  • npm run typecheck
  • npm test — new profile tests pass ✅

Closes #204

…essweb#204)

Add a profiles map (model, baseUrl, apiKey, thinkingEnabled, reasoningEffort, temperature) and an optional defaultProfile to settings.json. The /model dropdown lists saved profiles for one-click switching via writeProfileSelection, and the default profile is applied as a fallback when resolving settings.

(cherry picked from commit 5ee6ca63f187d0545a966f7e0037a978adf39161)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

**Title:** Support multiple model profiles in settings.json for quick switching via /model

1 participant