Skip to content

🤖 refactor: persist model settings to backend instead of localStorage #1561

@ammar-agent

Description

@ammar-agent

Currently defaultModel, hiddenModels, and compactionModel (via modeAiDefaults) are stored in localStorage. This creates issues:

  • Settings don't sync across devices
  • Settings are lost if browser storage is cleared
  • Inconsistent with other config that uses the backend (~/.mux/config.json)

Current state

  • defaultModel: usePersistedState('model-default', ...)
  • hiddenModels: usePersistedState('hidden-models', ...)
  • compactionModel: usePersistedState(MODE_AI_DEFAULTS_KEY, ...) → modeAiDefaults.compact.modelString

Proposed change

Move these to backend config and expose via api.config methods. The backend already has modeAiDefaults support—extend it or add dedicated fields.


Generated with mux

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions