rowboat/apps/x/packages
Prakhar Pandey 6fc5d5ec11 fix: surface Ollama's real error message instead of bare HTTP statusText
Ollama returns errors as {"error":"<string>"}, but ollama-ai-provider-v2's
error parser expects OpenAI-style {"error":{"message":...}}. The schema
mismatch makes the AI SDK fall back to the HTTP statusText, so users only
ever saw "Bad Request"/"Not Found" while Ollama's actual reason (model not
found, no tool support, ...) was swallowed -- which is why reports like
#696 were impossible to debug.

makeOllamaThinkFetch now rewraps failed responses' plain-string error
bodies into the nested shape the provider parses, preserving status,
statusText and headers (content-length dropped so the runtime recomputes
it). Successful responses, already-nested errors and non-JSON bodies pass
through untouched. The wrapper's two fetch call sites were merged into one
so both the /api/chat path and the passthrough get the same error handling
without a duplicate-request hazard.

Refs #696

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:30:13 +05:30
..
core fix: surface Ollama's real error message instead of bare HTTP statusText 2026-07-10 14:30:13 +05:30
shared refactor(x): one delivery path for turn events — chat, channels, deltas 2026-07-09 15:47:21 +05:30