fix(llm): omit parallel_tool_calls on tool-less calls (Azure OpenAI 400) - #951
Open
herman-young-ai wants to merge 1 commit into
Open
fix(llm): omit parallel_tool_calls on tool-less calls (Azure OpenAI 400)#951herman-young-ai wants to merge 1 commit into
herman-young-ai wants to merge 1 commit into
Conversation
`make_model_settings` set `parallel_tool_calls=False` unconditionally, but the
parameter is only valid alongside a tool list. Azure OpenAI rejects it outright:
BadRequestError - Invalid value for 'parallel_tool_calls':
'parallel_tool_calls' is only allowed when 'tools' are specified.
The native OpenAI route silently tolerates it, so the divergence only surfaces
on Azure deployments — where it makes Strix unusable end to end.
Four call paths send no tools, and all four break:
- warm_up_llm, main model -> blocks startup (sys.exit(1))
- warm_up_llm, dedupe model -> blocks startup
- compaction._summarize -> fails on context overflow, mid-scan
- dedupe._dedupe_model_settings -> fails per vulnerability report
Only the agent loop in core/runner.py carries tools, so fixing the warm-up
alone would still leave a scan that dies the first time context fills or a
finding is recorded.
Add an explicit `with_tools` keyword to `make_model_settings`, defaulting to
the existing behaviour, and set it False at the four tool-less call sites.
`ModelSettings` drops None fields, so the parameter is simply not sent.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR prevents Azure OpenAI from receiving
Confidence Score: 5/5The PR appears safe to merge, with every current tool-less model request updated consistently and the tool-bearing agent path preserving its existing setting. All four changed production callers issue requests without tools and now omit the Azure-incompatible parameter, while the only remaining default path constructs agents with a nonempty tool list. Important Files Changed
Reviews (1): Last reviewed commit: "fix(llm): omit parallel_tool_calls on to..." | Re-trigger Greptile |
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.
Problem
make_model_settingssetsparallel_tool_calls=Falseunconditionally, but the parameter is only valid alongside a tool list. Azure OpenAI rejects it outright:The native OpenAI route silently tolerates it, so the divergence only surfaces on Azure deployments — where it currently makes Strix unusable end to end.
warm_up_llmfails before any scan starts, sostrix --target ...exits 1 withLLM CONNECTION FAILED.Scope
Four call paths send no tools, and all four break on Azure:
warm_up_llm, main modelsys.exit(1))warm_up_llm, dedupe modelcompaction._summarizededupe._dedupe_model_settingsOnly the agent loop in
core/runner.pycarries tools and is unaffected — so fixing the warm-up alone would still leave a scan that dies the first time context fills or a finding is recorded.Change
Add an explicit
with_toolskeyword tomake_model_settings, defaulting to the current behaviour, and set itFalseat the four tool-less call sites.ModelSettingsdropsNonefields, so the parameter is simply not sent rather than sent asfalse.No behaviour change on any existing route: every tool-carrying call keeps
parallel_tool_calls=False.Verification
Reproduced and confirmed fixed against a live Azure OpenAI deployment (
azure/gpt-5.4, Entra ID auth):Two regression tests added in
tests/test_inputs.pycovering both branches.ruff check/ruff format/mypyclean on all changed files. Full suite: 628 passed, with one pre-existing order-dependent failure intests/test_execution.py::test_finish_scan_bypasses_active_agent_guard_after_reservethat reproduces onmainwithout this change (it passes in isolation;tests/test_cost_tracking.pyleaves an uninitialisedReportStatein the module-level global).