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:
@@ -236,6 +236,9 @@
|
||||
"node-llama-cpp",
|
||||
"protobufjs",
|
||||
"sharp"
|
||||
]
|
||||
],
|
||||
"patchedDependencies": {
|
||||
"@mariozechner/pi-ai@0.53.0": "patches/@mariozechner__pi-ai@0.53.0.patch"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
patches/@mariozechner__pi-ai@0.53.0.patch
Normal file
13
patches/@mariozechner__pi-ai@0.53.0.patch
Normal 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
|
||||
Reference in New Issue
Block a user