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
Pollinations free models: tool calls emitted as text break the agent loop (flat envelope dialect, truncation/unknown-tool throws, full buffering) #870
Some Pollinations backends (observed: community/morriszdweck/glm-5.3-flash-free and community/scriptsnsenses-sys/gpt-6-luna:free, both routed through Poe) return tool calls as text instead of structured tool_calls. The middleware merged in #867 already decoded the nested {"name":"...","arguments":{...}} envelope, but real agent loops still break:
Flat dialect never decoded. In the real agent loop these models emit parameters as top-level keys — {"name":"shell","command":"echo hello-world"} — not nested under arguments. The current decoder only accepts the nested shape, so the call leaks as raw JSON text, the shell never runs, the model hallucinates the command output, and the turn dies after 3 finish-tool nudges.
Truncated think block kills the turn.unterminated reasoning block throw on any token-cap/disconnect truncation.
Hallucinated tool name kills the turn.model requested unavailable tool throw when an envelope names a tool that was not offered.
Everything buffers until stream end. All text replies from Pollinations models appear only when the stream finishes, making the TUI look frozen. Protocol reasoning is also fully buffered.
Repro
opencode run with a Pollinations free model (e.g. glm-5.3-flash-free), prompt run: echo hello-world. Expected: shell executes, clean finish. Actual: raw {"name":"shell","command":"echo hello-world"} JSON visible as assistant text, hallucinated output, turn killed after nudges.
This is the same class of instability previously seen with Qwen Chat tool calls.
Activity