Skip to main content

It seems that Groq doesn't support this message format for tool call results (which other providers do):

  • Standard format: {"role": "tool", "tool_call_id": 123, "name": "read_prd", "content": "PRD contents returned from tool", "arguments": {input_1: val1, input_2: val2}
  • Groq supports: {"role": "tool", "tool_call_id": 123, "name": "read_prd", "content": "PRD contents returned from tool"} <----- arguments key not supported

This becomes an issue when constructing multi-turn conversations where we’d like to inform the LLM of the exact tool calls that were previously made, with input-output (args-content) pairs to avoid making the same call in the next turn.

We can instrument scrappy work-arounds, but it is painful and ideally would use the standard OpenAI spec.

Can this be fixed to allow arguments key in tool call messages?

After looking deeper, OpenAI specs don't include this arguments param and cookbooks recommend just passing the tool call id and response content back to model. I think this is reasonable, given the model already has the tool call id and arguments from the assistant output. Anthropic docs also say the same.

Oddly enough, other providers accept the arguments key but do not mention it in docs/specs.


Reply