Pass --model CLI override to create_llm_client log line#69
Merged
Conversation
The `ask`, `generate`, and `verify` commands all accept a `--model`
flag whose value `resolve_settings` returns as `resolved_model`. Each
command then constructs an LLM client by calling create_llm_client
with `settings.llm.model` (the .env value) instead of `resolved_model`,
so the "Using {provider} LLM backend (model=…)" log line on the next
line shows the .env model rather than the override the user actually
asked for.
This was logging-only — the actual API calls in run_agent_loop and
similar already use `resolved_model` correctly — but the misleading log
line made it look like the override wasn't being applied.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #69 +/- ##
=======================================
Coverage 86.90% 86.90%
=======================================
Files 61 61
Lines 11462 11462
=======================================
Hits 9961 9961
Misses 1501 1501 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
github-actions Bot
pushed a commit
that referenced
this pull request
May 10, 2026
Pass --model CLI override to create_llm_client log line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
ask,generate, andverifycommands all accept a--modelflag thatresolve_settingsreturns asresolved_model. Each command then callscreate_llm_clientwithsettings.llm.model(the .env value) instead ofresolved_model, so the "Using {provider} LLM backend (model=…)" log line inllm.py:952shows the .env model rather than the override the user actually requested.This was logging-only — the actual API calls in
run_agent_loopalready useresolved_modelcorrectly (cli.py:231, generate.py:411, verify.py:118/125) — but the misleading log line made it look like the override wasn't being applied.Files changed
src/datasight/cli.py:133—run_ask_pipelinesrc/datasight/cli_commands/generate.py:312src/datasight/cli_commands/verify.py:100Test plan
prek run --all-filespassespytest -m \"not integration\"passes (1481 tests)datasight ask --model=X --file q.txtshowsmodel=Xin the startup log🤖 Generated with Claude Code