You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not much help, but I've dumped and raw body from Groq and we get:
body: "event: error\ndata: {\"error\":{\"message\":\"Failed to call a function. Please adjust your prompt. See 'failed_generation' for more details.\",\"type\":\"invalid_request_error\",\"code\":\"tool_use_failed\",\"failed_generation\":\"Tool use failed: JSON does not match the expected schema for tool calls\",\"status_code\":400}}\n\n",
```
{
"request_id": "req_01k07kynmtfdwvgajp3k23cbb0",
"created_at": "2025-07-15T18:01:05.946Z",
"error": {
"message": "Failed to call a function. Please adjust your prompt. See 'failed_generation' for more details.",
"type": "invalid_request_error",
"param": "",
"code": "tool_use_failed"
}
}
@everyone, please use the Subscribe button on the right sidebar to get notified on progress in this issue instead of spamming it with "+1" (which is not helpful in any way), thank you.
There was an issue on groq when kimi k2 was first released that was fixed from their side a while back.
Looking at the error message it seems it's a model issue hallucinating a tool that does not exist.
Is it falling consistently with the prompt you shared. If so you can try replacing the word "compute" with "write a python script that calculates". My guess is the model is trying to give you an answer by using python as a calculator rather than giving the script.
{"error":{"message":"Failed to call a function. Please adjust your prompt. See 'failed_generation' for more details.","type":"invalid_request_error","code":"tool_use_failed","failed_generation":"\u003c|tool_calls_section_begin|\u003e\u003c|tool_calls_section_begin|\u003e función check_check_availability:0 = {"appointment_type": "consultation", "start_time": "This Friday 8am", "end_time": "This Friday 11pm"}\u003c|tool_call_end|\u003e\u003c|tool_calls_section_end|\u003e"}}
Yesterday, I tested opencode Zen with Kimi (for the first time), and I didn't get a single tool call error. That said, this really looks like a provider issue. Sadly, it looks like we have to choose between speed and accuracy 😔
I prefer accuracy.
That's great to hear @michabbb thx for adding that, when the team was working on provider selection for zen one of the things they noticed is providers like groq and a lot of others tend to error constantly either tool calls or network failures, so I am glad at least anecdotally you are having a better experience with zen.
Activity
tombowditch commentedon Jul 15, 2025
FWIW, I'm seeing this too - maybe 80% of calls are failing. It eventually works if I keep telling it "continue" but fails fairly often.
jfreeland commentedon Jul 15, 2025
smash that subscribe button
tombowditch commentedon Jul 15, 2025
It's not much help, but I've dumped and raw body from Groq and we get:
pascalandy commentedon Jul 15, 2025
Same :-/
Log from my groc account
{ "request_id": "req_01k07kynmtfdwvgajp3k23cbb0", "created_at": "2025-07-15T18:01:05.946Z", "error": { "message": "Failed to call a function. Please adjust your prompt. See 'failed_generation' for more details.", "type": "invalid_request_error", "param": "", "code": "tool_use_failed" } }moesmufti commentedon Jul 15, 2025
+1
d3vr commentedon Jul 15, 2025
@everyone, please use theSubscribebutton on the right sidebar to get notified on progress in this issue instead of spamming it with "+1" (which is not helpful in any way), thank you.catdevnull commentedon Jul 15, 2025
updates from groq team: https://community.groq.com/discussion-forum-7/groq-kimi-k2-tool-call-issues-213
michabbb commentedon Jul 16, 2025
https://x.com/omarkilani/status/1945139550352732217
but today i still got errors and had to start a new conversation multiple times 😢
delip commentedon Sep 14, 2025
Hi All, I am digging through a bunch of issues related to this and I am not getting any clarity on the current status of a fix or a proposed solution.
Using
groq/moonshotai/kimi-k2-instruct-0905with a fresh run:opencode run "compute the sum of first 100 primes and divide by the log of their product"fails with
Note: simple prompts seem to work such as:
opencode run "tell me a joke"config details:
Can someone share where we are with this?
yousshim commentedon Sep 14, 2025
There was an issue on groq when kimi k2 was first released that was fixed from their side a while back.
Looking at the error message it seems it's a model issue hallucinating a tool that does not exist.
Is it falling consistently with the prompt you shared. If so you can try replacing the word "compute" with "write a python script that calculates". My guess is the model is trying to give you an answer by using python as a calculator rather than giving the script.
michabbb commentedon Sep 14, 2025
yep, i think this issue can be closed now
HugoPodworski commentedon Sep 29, 2025
{"error":{"message":"Failed to call a function. Please adjust your prompt. See 'failed_generation' for more details.","type":"invalid_request_error","code":"tool_use_failed","failed_generation":"\u003c|tool_calls_section_begin|\u003e\u003c|tool_calls_section_begin|\u003e función check_check_availability:0 = {"appointment_type": "consultation", "start_time": "This Friday 8am", "end_time": "This Friday 11pm"}\u003c|tool_call_end|\u003e\u003c|tool_calls_section_end|\u003e"}}
Issue doesn't seem to be fixed yet.
rekram1-node commentedon Sep 29, 2025
@HugoPodworski this is an issue on Groq's end seems to me, not sure what we could do about it unless you had something in mind?
michabbb commentedon Sep 29, 2025
Yesterday, I tested opencode Zen with Kimi (for the first time), and I didn't get a single tool call error. That said, this really looks like a provider issue. Sadly, it looks like we have to choose between speed and accuracy 😔
I prefer accuracy.
rekram1-node commentedon Sep 29, 2025
That's great to hear @michabbb thx for adding that, when the team was working on provider selection for zen one of the things they noticed is providers like groq and a lot of others tend to error constantly either tool calls or network failures, so I am glad at least anecdotally you are having a better experience with zen.
fix(hooks): pass phase argument from hook ID to observe.sh (anomalyco…
minor detail (anomalyco#1018)