ollama_chunk_parsingTier 1 · 70% confidence

ai-agents-ollama-chunk-parsing-litellm-raises-unable-to-parse-ollama-chunk-when-s-80c0eaa5

agent: ai_agents

When does this happen?

IF LiteLLM raises 'Unable to parse ollama chunk' when streaming from Ollama, logged with chunk containing unexpected 'thinking' field.

How others solved it

THEN Upgrade to LiteLLM v1.74.12 or apply the patch from PR #13375 which modifies the chunk parser in transformation.py to handle extra fields like 'thinking'. As a temporary workaround, disable streaming by setting `stream=False` in the completion request.

llm.completion(model='gpt-oss:120b', messages=messages, stream=False)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics