fix(llm): omit parallel_tool_calls on tool-less requests - #1029
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Greptile SummaryThe PR conditionally omits
Confidence Score: 5/5The PR appears safe to merge, with every identified tool-less caller updated consistently and no concrete regression found. The shared default remains unchanged for the tool-enabled agent loop, while all four reachable calls that pass an empty tools list now request omission of the Azure-incompatible parameter. Important Files Changed
Reviews (1): Last reviewed commit: "fix(llm): omit parallel_tool_calls on to..." | Re-trigger Greptile |
Summary
Azure OpenAI rejects any chat.completions request that carries
parallel_tool_callswithouttools:make_model_settingshardcodesparallel_tool_calls=False, and the openai-agents LiteLLM model forwardsFalseeven whentools=[], so every tool-less request fails on Azure. Since the scan preflight was added, that failure is fatal ("Scan failed") at startup. LiteLLM'sdrop_paramsdoes not drop this param (BerriAI/litellm#8980), so it must be omitted at the source.The four tool-less call sites now pass
has_tools=False: scan preflight (preflight_model_connection), dedupe-model warm-up, compaction_summarize, and finding dedupe_dedupe_model_settings. The agent loop is unchanged and keepsparallel_tool_calls=False.Verified against a mock Azure endpoint enforcing the real invariant: before, the preflight sent
{"parallel_tool_calls": false}with notoolsand got the 400 above; after, the param is omitted and the preflight succeeds.Link to Devin session: https://app.devin.ai/sessions/b7e52c0b8fbb4f148d2fb08fb00a1534
Requested by: @0xallam