Quick Summary
When configuring Groq as the LLM provider, all agent calls fail with a 400 tool_use_failed error. The model generates responses using a <function=name{...}> format which Groq's API rejects, as it expects standard OpenAI-style tool calls.
Environment & Tools
PicoClaw Version: main branch
AI Model & Provider: llama-3.3-70b-versatile via Groq
Operating System: macOS
Channels: CLI
📸 Steps to Reproduce
Add a Groq model entry to model_list in ~/.picoclaw/config.json with "model": "groq/llama-3.3-70b-versatile"
Set agents.defaults.model to the corresponding model_name
Run picoclaw agent -m "Hello"
❌ Actual Behavior
Status: 400
{"error":{"message":"Failed to call a function. Please adjust your prompt.","type":"invalid_request_error","code":"tool_use_failed","failed_generation":"<function=message{"channel": "cli", "content": "Hello, how can I help you?"},-------------"}}
✅ Expected Behavior
Agent responds normally via Groq's API.
💬 Additional Context
The system prompt appears to instruct the model to use a custom <function=name{...}> format. Groq's API enforces strict OpenAI-compatible tool call schemas and rejects this format. A fix would be to use native OpenAI-style tool_calls when the provider is Groq or any OpenAI-compatible endpoint. The issue does not appear to be with the API key or model availability. basic Groq API calls work fine outside of picoclaw.

Quick Summary
When configuring Groq as the LLM provider, all agent calls fail with a 400 tool_use_failed error. The model generates responses using a <function=name{...}> format which Groq's API rejects, as it expects standard OpenAI-style tool calls.
Environment & Tools
PicoClaw Version: main branch
AI Model & Provider: llama-3.3-70b-versatile via Groq
Operating System: macOS
Channels: CLI
📸 Steps to Reproduce
Add a Groq model entry to
model_listin~/.picoclaw/config.jsonwith"model": "groq/llama-3.3-70b-versatile"Set
agents.defaults.modelto the correspondingmodel_nameRun
picoclaw agent -m "Hello"❌ Actual Behavior
Status: 400
{"error":{"message":"Failed to call a function. Please adjust your prompt.","type":"invalid_request_error","code":"tool_use_failed","failed_generation":"<function=message{"channel": "cli", "content": "Hello, how can I help you?"},-------------"}}
✅ Expected Behavior
Agent responds normally via Groq's API.
💬 Additional Context
The system prompt appears to instruct the model to use a custom <function=name{...}> format. Groq's API enforces strict OpenAI-compatible tool call schemas and rejects this format. A fix would be to use native OpenAI-style tool_calls when the provider is Groq or any OpenAI-compatible endpoint. The issue does not appear to be with the API key or model availability. basic Groq API calls work fine outside of picoclaw.