Skip to content

Console-first model setup: /keys + /model become the complete, reliable path - #2

Merged
adigo-pro merged 5 commits into
mainfrom
console-model-flexibility
Aug 2, 2026
Merged

Console-first model setup: /keys + /model become the complete, reliable path#2
adigo-pro merged 5 commits into
mainfrom
console-model-flexibility

Conversation

@adigo-pro

Copy link
Copy Markdown
Owner

What this does

Makes the interactive console the complete way to configure CodeCouncil's models — /keys + /model alone now always produce a working, intentional setup, for any supported provider key.

Four changes (plan: docs/plans/2026-08-01-console-model-flexibility.md):

  1. Per-key model auto-defaults (critic/agent.py, core/config.py): with no model configured, the first configured key picks its provider's default model (KEY_DEFAULT_MODELS, ordered: free NVIDIA first, Anthropic last for decorrelation). Previously only NVIDIA_API_KEY auto-defaulted — an OpenAI/OpenRouter key alone fell through to pi's possibly-unauthenticated default.
  2. /model//prober beat stale launch flags (codecouncil/main.py): a knob set via the console now resolves from config.json only — a launch-time --model flag or exported COUNCIL_MODEL no longer silently overrides the slash command on critic restart (per-knob console_set tracking).
  3. /model validates + informs (codecouncil/console.py, core/config.py): setting a model warns (never blocks) on a missing provider key, malformed provider/model-id, or single-segment openrouter/nvidia-nim ids that would 404. Bare /model shows the current resolved model, which layer set it (flag/env/config/auto), and copy-pasteable examples for the keys actually configured.
  4. /keys chains into model choice: after saving a key, the console reports the model the critic will use, and offers that provider's default when the current model runs on a different key.

Docs: README and CLAUDE.md now lead with /keys (hidden input) instead of the echo ... >> ~/.codecouncil/env pattern, which leaves credentials in shell history.

Testing

  • 20 new stdlib-unittest tests (tests/test_codecouncil.py, tests/test_agent.py): map consistency, check_model shapes, resolve_with_source, per-knob override resolution, console flows with mocked input/getpass.
  • Full suite: 667 tests OK (Python 3.13). ruff==0.15.22 clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A2CMGoziPn6h1vK94rSLeJ

@adigo-pro
adigo-pro merged commit 0d003ba into main Aug 2, 2026
12 checks passed
@adigo-pro
adigo-pro deleted the console-model-flexibility branch August 2, 2026 01:00
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