Skip to content
This repository was archived by the owner on May 23, 2026. It is now read-only.

v0.3.0 — Fix model overwrite and clear

Latest

Choose a tag to compare

@JRedeker JRedeker released this 07 Mar 22:50
· 9 commits to trunk since this release

What's Fixed

Model assignments can now be overwritten and cleared properly.

Previously, ApplyPreferences skipped targets with no preference entry, so:

  • Clearing a model assignment (via d or the (none) picker option) never removed the model key from opencode.json
  • The old model persisted even after the user explicitly cleared it

Changes

  • New cleared_models field in omp-preferences.json — tracks targets whose model was explicitly cleared by the user
  • ApplyPreferences now deletes the model key from opencode.json for cleared targets (other fields like mode are preserved)
  • Assigning a new model to a previously cleared target removes it from cleared_models
  • Updated README and routing spec to document the new clearing behavior
  • Added tests for both overwrite and clear scenarios

Config format

{
  "target_models": {
    "build": "anthropic/claude-opus-4"
  },
  "cleared_models": {
    "scout": true
  }
}

Upgrade

cd opencode-model-preferences
git pull
make install

Existing omp-preferences.json files are fully compatible — the new cleared_models field is optional and defaults to empty.