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
{{ message }}
Repository navigation
tool_call.arguments truncated to exactly 214 chars on Ollama Cloud API #15647
Bug Description
When using models via the Ollama Cloud API (https://ollama.com/v1), tool_call.function.arguments is truncated to exactly 214 characters.
This produces invalid JSON that causes HTTP 400: invalid tool call
arguments on subsequent API calls that include the truncated
arguments in conversation history.
Steps to Reproduce
Call POST /v1/chat/completions with glm-5.1 (or qwen3.5) and tool definitions
In a multi-turn conversation where the model generates tool calls
with arguments > 214 chars 3. The returned tool_call.function.arguments is truncated to exactly
214 characters 4. Sending the conversation history (including the truncated args)
back to the API returns 400: invalid tool call arguments
Evidence
Across 35+ error instances, every single invalid arguments field is exactly 214 characters long, strongly suggesting a server-side buffer or limit:
All 46 invalid tool_calls: 214 chars (100%)
Examples of truncated arguments:
{"code":"from hermes_tools import terminal\n\nrepos = [\n
("alexpate/awesome-design-systems"... → truncated mid-string - {"command":"cd ~/design-md && for d in */; do echo "${d%/}"; done
| sort > /tmp/... → truncated mid-command - {"path":"/home/emma/北雅英语/BEIYA-DESIGN-WORKFLOW.md","content":"# 北雅 AI 设计... → truncated mid-content
Expected Behavior
tool_call.function.arguments should contain complete, valid JSON regardless of length. If there is a length limit, the model should be constrained to produce arguments within that limit, or the API
should return an error rather than silently truncating.
Activity
PureBlissAK commentedon Apr 18, 2026
🤖 Automated Triage & Analysis Report
Issue: #15647
Analyzed: 2026-04-18T18:13:50.898637
Analysis
Implementation Plan
This issue has been triaged and marked for implementation.
horendus commentedon Apr 21, 2026
Solid analysis by the bot