-
-
Notifications
You must be signed in to change notification settings - Fork 57.1k
Description
Bug type
Regression (introduced by #32080)
Summary
The fix in #32080 strips unsupported JSON Schema keywords for xAI models, but the isXaiProvider() detection does not cover the Venice provider. When Venice serves xAI/Grok models (e.g. grok-4.1-fast), the provider string is venice — which contains neither xai nor x-ai — so the schema cleaning is skipped and requests fail with the same error.
[agent/embedded] embedded run agent end: ... error=Invalid arguments passed to the model.
Steps to reproduce
- Configure OpenClaw with Venice as provider and a Grok model as primary:
"agents": {
"defaults": {
"model": {
"primary": "venice/grok-4.1-fast"
}
}
}- Send any agent request.
Expected behavior
Request succeeds (same as with other models on Venice).
Actual behavior
Invalid arguments passed to the model — identical to the OpenRouter/xAI failure fixed in #32080.
Root cause
isXaiProvider() in src/agents/schema/clean-for-xai.ts only checks for:
- provider string containing
xaiorx-ai openrouter+ model prefixx-ai/
It does not handle the case where Venice proxies xAI/Grok models. The model ID on Venice is just grok-4.1-fast (no x-ai/ prefix), so neither heuristic matches.
Suggested fix
Extend isXaiProvider() to also detect Venice + Grok model IDs, similar to the existing OpenRouter branch:
// Venice proxies xAI/Grok models; model IDs start with "grok-"
if (provider === "venice" && modelId?.toLowerCase().startsWith("grok-")) {
return true;
}OpenClaw version
2026.3.2 (main)
Related
- [Bug]: error when sending a request to x-ai/grok-4.1-fast via OpenRouter #32039 (original xAI/OpenRouter bug)
- fix(tools): strip xAI-unsupported JSON Schema keywords from tool definitions #32080 (partial fix — does not cover Venice)