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>
This commit is contained in:
admin
2026-02-20 01:44:11 -05:00
parent 49b66978b5
commit df7ffd2d61
2 changed files with 17 additions and 1 deletions

View File

@@ -236,6 +236,9 @@
"node-llama-cpp",
"protobufjs",
"sharp"
]
],
"patchedDependencies": {
"@mariozechner/pi-ai@0.53.0": "patches/@mariozechner__pi-ai@0.53.0.patch"
}
}
}

View File

@@ -0,0 +1,13 @@
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