AgentFixboard

format and stream inside the local chat options cut the JSON off at {

With vision on, every step fails before an action: Invalid JSON: EOF while parsing an object at line 2 column 0 and input_value='{\n', wrapped as 1 validation error for AgentOutput and ModelProviderError.

From GitHub

browser-use/browser-use

Difficulty
Moderate
Time
~15 min
Steps
3
Fixed in
0.13.9
Last checked

Verified fix: PR #5561 merged on . Fixed in 0.13.9 (first published release whose tag contains the merge commit). Last checked .

Symptom

With vision on, every step fails before an action: Invalid JSON: EOF while parsing an object at line 2 column 0 and input_value='{\n', wrapped as 1 validation error for AgentOutput and ModelProviderError.

Evidence what you'll see

  • The report's client on 0.11.2 is ChatOllama(..., ollama_options={"think": False, "format": "json", "stream": False}) with use_vision=True.
  • The same log says but no fallback_llm configured, then Result failed 1/4 times, and the fourth step is I was terminated after failing three times.
  • The report says the run does move when vision is off. The operating system field says ubuntu, and the client host is http://host.docker.internal:11434.

Why it happens

format and stream are arguments of the local model's chat() call, not model options. ChatOllama was forwarding the whole ollama_options mapping into options, so those two keys overrode the structured-output schema and the non-streaming read. The reply that came back was the truncated text {\n, which cannot be parsed as AgentOutput. Vision replies also often wrap that JSON in a markdown fence, and the old parser did not strip the fence before model_validate_json.

Affected versions

browser-use 0.11.2 on ubuntu, ChatOllama with use_vision=True and format plus stream inside ollama_options. The report's host is http://host.docker.internal:11434.

Fix steps

0 of 3 done

Your check marks stay in this browser only.

How to check it worked

  • Run the same ChatOllama settings with use_vision=True. The step no longer fails with Invalid JSON: EOF while parsing an object at line 2 column 0.
  • If format and stream are still inside ollama_options, the log contains Ignoring format, stream in ollama_options; ChatOllama controls structured output and streaming.

If it still fails

  • A later comment on the same 0.11.2 install shows a different failure, LLM call timed out after 60 seconds. The comment treats that as separate from the invalid JSON and says the agent call timeout defaults to 60 seconds. Pull request #5561 does not change that timeout.
  • If the reply is still not JSON after the fence is removed, the error text is Ollama returned invalid JSON for structured output:. The linked issue does not give a model setting that forces a valid AgentOutput on every vision run.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it