Files
Moltbot/patches/@mariozechner__pi-ai@0.53.0.patch
admin df7ffd2d61 fix(agents): make parallel_tool_calls fix persistent via pnpm patch
- Add pnpm patch for @mariozechner/pi-ai@0.53.0 to disable parallel_tool_calls
- Update package.json and pnpm-lock.yaml to include the patched dependency
- Resolves HTTP 400 errors with models that don't support parallel tool calls (Kimi K2.5, Llama 3.3)
- Documentation updated in SRC-CUSTOMIZATION-LOG.md and OPENCLAW-GUIDE.md

Co-Authored-By: Gemini CLI <gemini-cli@google.com>
2026-02-20 01:47:00 -05:00

14 lines
736 B
Diff

diff --git a/dist/providers/openai-completions.js b/dist/providers/openai-completions.js
index 8c974317b88de3103d664c321e79bd6e6aa0f169..a7fab0dbd38256e840a91440c182d24c3108923d 100644
--- a/dist/providers/openai-completions.js
+++ b/dist/providers/openai-completions.js
@@ -335,6 +335,8 @@ function buildParams(model, context, options) {
}
if (context.tools) {
params.tools = convertTools(context.tools, compat);
+ // Disable parallel tool calls for models that don't support them (e.g. Kimi K2.5)
+ params.parallel_tool_calls = false;
}
else if (hasToolHistory(context.messages)) {
// Anthropic (via LiteLLM/proxy) requires tools param when conversation has tool_calls/tool_results