From dffe174420f18552f85fdefe7a5b0acc7df5d2ce Mon Sep 17 00:00:00 2001 From: Daniel Thom Date: Sun, 10 May 2026 11:07:35 -0600 Subject: [PATCH] Pass --model CLI override to create_llm_client log line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/datasight/cli.py | 2 +- src/datasight/cli_commands/generate.py | 2 +- src/datasight/cli_commands/verify.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datasight/cli.py b/src/datasight/cli.py index b062451..6aa4bc4 100644 --- a/src/datasight/cli.py +++ b/src/datasight/cli.py @@ -130,7 +130,7 @@ async def run_ask_pipeline( api_key=settings.llm.api_key, base_url=settings.llm.base_url, timeout=settings.llm.timeout, - model=settings.llm.model, + model=resolved_model, ) sql_runner = create_sql_runner_from_settings(settings.database, project_dir) diff --git a/src/datasight/cli_commands/generate.py b/src/datasight/cli_commands/generate.py index 0db5afd..4b5cfaa 100644 --- a/src/datasight/cli_commands/generate.py +++ b/src/datasight/cli_commands/generate.py @@ -309,7 +309,7 @@ async def _run(): # noqa: C901 api_key=settings.llm.api_key, base_url=settings.llm.base_url, timeout=settings.llm.timeout, - model=settings.llm.model, + model=resolved_model, ) if sqlite_source_path is not None: diff --git a/src/datasight/cli_commands/verify.py b/src/datasight/cli_commands/verify.py index e81ded3..67686cc 100644 --- a/src/datasight/cli_commands/verify.py +++ b/src/datasight/cli_commands/verify.py @@ -97,7 +97,7 @@ async def _run(): api_key=settings.llm.api_key, base_url=settings.llm.base_url, timeout=settings.llm.timeout, - model=settings.llm.model, + model=resolved_model, ) sql_runner = create_sql_runner_from_settings(settings.database, project_dir)