Skip to content

Give a hand-set LLM provider its own default model - #210

Merged
thesanogoeffect merged 2 commits into
mainfrom
claude/project-thread-od0jfv
Oct 18, 2026
Merged

thesanogoeffect merged 2 commits into
mainfrom
claude/project-thread-od0jfv

Conversation

@thesanogoeffect

Copy link
Copy Markdown
Member

Requested by Jakub · project thread

Before: LLM_PROVIDER=anthropic (or --llm-provider anthropic) without LLM_MODEL sent the Gemini default, gemini-3.5-flash-lite, to Anthropic, which answered 404. Every non-Google provider had the same problem. bibr setup always writes LLM_MODEL, so this hit hand-written envs, such as a Docker deploy.

After: an unset LLM_MODEL follows the provider, using the models bibr setup already writes: claude-haiku-5-5 for anthropic, gpt-5-nano for openai, llama-3.3-70b-versatile for groq, and gpt-oss:20b for ollama. An LLM_MODEL you set yourself is always kept. An openai provider with LLM_BASE_URL keeps the old default, since bibr can't guess what model a self-hosted server serves.

How:

  • bibr/config.py: a new DEFAULT_LLM_MODELS table and an LlmOptions validator that fills model from it when model isn't in model_fields_set. The default is kept out of model_fields_set, so a later provider change still treats the model as unset. setup_wizard.LLM_DEFAULTS now reads its models from the same table.
  • bibr/local/cli/run_config.py: --llm-provider swaps the provider after the settings are built, so it calls the same step again. Presets need nothing extra, because they rebuild the settings through the validators.
  • Docs (configuration and deployment guides, .env.example) and the CHANGELOG describe the new default.
  • Tests cover every provider, an explicit model being kept, the openai + LLM_BASE_URL case, a provider swap, and the CLI flag. The Anthropic adapter tests in test_provider_temperature.py and test_anthropic_thinking_caps.py now pin claude-haiku-4-5. Without a model, they would get Haiku 5.5, which rejects temperature and budget thinking, the very parameters those tests check.

Checks: ruff check, ruff format --check, and pytest -m "not slow" pass (14,213 passed). The only other failure was test_rate_limiter.py::test_serial_waiters_are_pacing, a timing test that fails under full-suite load and passes on its own, as noted on #207.


Generated by Claude Code

Setting LLM_PROVIDER (or --llm-provider) without LLM_MODEL kept the Gemini
default, so a hand-set anthropic provider, as in a Docker deploy, got a 404.
An unset LLM_MODEL now follows the provider, using the models bibr setup
already writes (DEFAULT_LLM_MODELS, shared with setup_wizard.LLM_DEFAULTS).
An openai provider with LLM_BASE_URL is left alone, since only that server
knows its model's name.
@thesanogoeffect thesanogoeffect self-assigned this Oct 18, 2026
@thesanogoeffect
thesanogoeffect merged commit 2368312 into main Oct 18, 2026
17 checks passed
@thesanogoeffect
thesanogoeffect deleted the claude/project-thread-od0jfv branch October 18, 2026 09:56
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.56%. Comparing base (d2b75ba) to head (15b99dc).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #210   +/-   ##
=======================================
  Coverage   90.55%   90.56%           
=======================================
  Files         309      309           
  Lines       57289    57305   +16     
  Branches    10376    10379    +3     
=======================================
+ Hits        51879    51897   +18     
+ Misses       3450     3449    -1     
+ Partials     1960     1959    -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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