Skip to content

mngr/minds-model-configs#1025

Open
joshalbrecht wants to merge 5 commits intojosh/polish_mindsfrom
mngr/minds-model-configs
Open

mngr/minds-model-configs#1025
joshalbrecht wants to merge 5 commits intojosh/polish_mindsfrom
mngr/minds-model-configs

Conversation

@joshalbrecht
Copy link
Copy Markdown
Contributor

Automated PR created by Claude Code session.

joshalbrecht and others added 5 commits March 28, 2026 09:21
Add two new config fields to ClaudeAgentConfig that get written to
$CLAUDE_CONFIG_DIR/settings.json:

- model (str | None): optionally set the model for any claude agent
  (e.g. "opus[1m]")
- fast_mode (bool, default False): optionally enable fast mode

For local hosts, these overrides are applied after syncing user
resources (replacing symlinks with a regular file when needed).
For remote hosts, they are injected into the generated settings.json.

Also removes the hardcoded "fastMode": True from the workspace-level
settings.json in the claude-mind provisioning, since fast_mode is
now a configurable option on the agent config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rrides

Problem: The except clause at line 676 in _apply_settings_json_overrides
silently caught both FileNotFoundError and json.JSONDecodeError. While
FileNotFoundError is expected (settings file may not exist yet),
JSONDecodeError means the existing file is corrupt and its contents are
being silently discarded.

Fix: Split the except clause so FileNotFoundError is handled silently
(expected case) while JSONDecodeError logs a warning to inform the user
that their corrupt settings file will be replaced with overrides only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: The new _apply_settings_json_overrides function and the new
model/fast_mode parameters to _build_settings_json_content had no test
coverage, risking silent regressions in per-agent model selection and
fast mode configuration.

Fix: Added 12 unit tests covering _build_settings_json_content (default
behavior, model override, fast_mode override, both combined, interaction
with local settings sync) and _apply_settings_json_overrides (no-op when
no overrides, creating new files with model/fast_mode, merging with
existing settings, replacing symlinks with regular files, handling
corrupt JSON).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: The new tests used FakeHost() directly where OnlineHostInterface
was expected, causing type checker errors. Also had a trailing comment
that violated the ratchet.

Fix: Wrap FakeHost() calls with cast(OnlineHostInterface, ...) to match
the pattern used elsewhere in the test file. Moved the trailing comment
to its own line.

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