Skip to content

feat: pin backend/model defaults with --default and default-aware pickers#21

Open
nelopuchades wants to merge 3 commits into
GetSmallAI:mainfrom
nelopuchades:feat/persist-backend-model-default
Open

feat: pin backend/model defaults with --default and default-aware pickers#21
nelopuchades wants to merge 3 commits into
GetSmallAI:mainfrom
nelopuchades:feat/persist-backend-model-default

Conversation

@nelopuchades

@nelopuchades nelopuchades commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

Small Harness reads backend / modelOverride from agent.config.json at
launch, but the only way to change those project defaults was to re-run /setup
or hand-edit the file. Switching model or backend mid-session (/model,
/backend) applied for that session only and silently reverted on the next
launch, with no indication in the picker of what was actually persisted.

This change lets you pin the active — or newly selected — backend/model straight
into agent.config.json, and makes the interactive pickers show what is live
versus what is saved on disk.

Summary of changes

Persisting defaults

  • Add /model --default and /backend --default to surgically merge backend
    and modelOverride into agent.config.json without re-running /setup
  • /model … --default writes backend + modelOverride; /backend … --default
    writes backend and clears modelOverride so the next launch uses that
    backend's built-in default model
  • Session changes still apply if the file can't be written; invalid or non-object
    JSON is never overwritten

Default-aware pickers

  • Tag each /model and /backend entry (selected) when it is the live session
    choice and (default) when it matches what would load on next launch (read via
    the new config::persisted_defaults helper); both show when they coincide
  • Append --default to a picker selection (e.g. 3 --default) to pin it as you
    choose; otherwise a y/N prompt offers to save the choice as the project default

Docs

  • Document the flag, the inline --default pinning, and the markers in the README
    and Unreleased CHANGELOG

Verified by

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test (565 passed)

Screenshots

image image

nelopuchades and others added 3 commits July 16, 2026 08:20
Add /model --default and /backend --default to surgically update
backend and modelOverride in agent.config.json without re-running
setup. Session switches still apply if the file cannot be written.
Distinguish the live session choice from the value persisted in
agent.config.json. The `/model` and `/backend` pickers now tag each entry
`(selected)` when it matches the active session model/backend and `(default)`
when it matches what would load on next launch (read via the new
config::persisted_defaults helper). Both tags show when they coincide.

Add tests for persisted_defaults and parse_picker_selection; document the
markers and inline `--default` pinning in the README and CHANGELOG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant