Skip to content

Bug: Unable to complete task using browser use(GPT5.1/5.2/5.3/5.4) #4786

@Chiragkamra1

Description

@Chiragkamra1

Browser Use Version

0.11.5-0.12.6

Bug Description, Steps to Reproduce, Screenshots

INFO [Agent] 📍 Step 24:WARNING [Agent] ⚠️ LLM error (ModelProviderError: 1 validation error for AgentOutput Invalid JSON: EOF while parsing a value at line 1 column 0 [type=json_invalid, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.13/v/json_invalid) but no fallback_llm configuredWARNING [Agent] ❌ Result failed 2/5 times: 1 validation error for AgentOutput Invalid JSON: EOF while parsing a value at line 1 column 0 [type=json_invalid, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.13/v/json_invalidStacktrace:Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/llm/openai/chat.py", line 258, in ainvoke parsed = output_format.model_validate_json(response.choices[0].message.content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydantic/main.py", line 782, in model_validate_json return cls.pydantic_validator.validate_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^pydantic_core._pydantic_core.ValidationError: 1 validation error for AgentOutput Invalid JSON: EOF while parsing a value at line 1 column 0 [type=json_invalid, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.13/v/json_invalid
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/agent/service.py", line 996, in step await self._get_next_action(browser_state_summary) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/observability.py", line 73, in async_wrapper return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/agent/service.py", line 1073, in _get_next_action model_output = await asyncio.wait_for( ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/tasks.py", line 479, in wait_for return fut.result() ^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/agent/service.py", line 1328, in _get_model_output_with_retry model_output = await self.get_model_output(input_messages) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/utils.py", line 384, in wrapper result = await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/observability.py", line 73, in async_wrapper return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/agent/service.py", line 1611, in get_model_output response = await self.llm.ainvoke(input_messages, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/tokens/service.py", line 341, in tracked_ainvoke result = await original_ainvoke(messages, output_format, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/browser_use/llm/openai/chat.py", line 276, in ainvoke raise ModelProviderError(message=str(e), model=self.name) from ebrowser_use.llm.exceptions.ModelProviderError: 1 validation error for AgentOutput Invalid JSON: EOF while parsing a value at line 1 column 0 [type=json_invalid, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.13/v/json_invalid
actions are:['navigate', 'wait', 'input', 'input', 'select_dropdown', 'click', 'click', 'click', 'input', 'input', 'click', 'click', 'click', 'input', 'input', 'select_dropdown', 'click', 'click', 'click', 'input', 'input', 'input', 'input', 'click', 'click', 'click']INFO [Agent]

Facing this issue after 20-24 steps, GPT starts facing this issue. Facing this from last week.

Failing Python Code

LLM Model

GPT5.1/5.2/5.3/5.4

Operating System & Browser Versions

No response

Full DEBUG Log Output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions