Repository navigation
fix(llm): stop putting format/stream inside Ollama options - #5561
Merged
MagMueller merged 2 commits intoAug 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Ollama treats those as top-level chat() parameters. Forwarding them in ollama_options broke structured JSON from vision models, which is the failure in #5017.
MagMueller
force-pushed
the
fix/5017-ollama-options-json
branch
from
August 27, 2026 19:27
f497aa3 to
ed5f467
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
formatandstreampassed throughChatOllama(ollama_options=...)are not model options. They are top-levelchat()parameters, and forwarding them is what produced the truncated structured JSON in Bug: Invalid Json error in browser-use while using ollama vision models, I have used upto 27B paramete models. #5017.jsonfences beforemodel_validate_json, which Ollama vision models often add around the payload.Fixes #5017.
Test plan
uv run pytest tests/ci/models/test_llm_ollama.py -qfailed on main, then passed after the changeSummary by cubic
Fixes #5017 by stopping
formatandstreamfrom being passed inside Ollamaollama_options; they are top-levelchat()parameters and caused structured output to break.think,logprobs,top_logprobs, andkeep_aliveto top-levelchat()parameters as well.ModelProviderErrorinstead of a raw validation error.Written for commit ed5f467. Summary will update on new commits.