Skip to content

Fix: browser_vision unconditionally passes --full, producing unreadable screenshots on long pages (#19620) - #19765

Open
umeshchandra-rao wants to merge 1 commit into
NousResearch:mainfrom
umeshchandra-rao:openfix/issue-19620-mor7tous
Open

Fix: browser_vision unconditionally passes --full, producing unreadable screenshots on long pages (#19620)#19765
umeshchandra-rao wants to merge 1 commit into
NousResearch:mainfrom
umeshchandra-rao:openfix/issue-19620-mor7tous

Conversation

@umeshchandra-rao

Copy link
Copy Markdown

What

The browser_vision function unconditionally took full-page screenshots. On long web pages, this produced excessively large and unreadable images, causing vision analysis to fail. This change introduces a full_page parameter to the function, which defaults to True to maintain backward compatibility. The screenshot command now only includes the --full flag when full_page is True, enabling callers to request a viewport-only screenshot.

Changes

  • tools/browser_tool.py:
    • Added a full_page: bool = True parameter to the browser_vision function signature.
    • Conditionally added the --full flag to the screenshot command based on the full_page parameter.
    • Updated the function docstring to reflect the new parameter.

How to verify

  1. Call browser_vision on a long web page with full_page=False.
  2. Verify the resulting screenshot captures only the visible viewport.
  3. Call browser_vision with full_page=True (or without the argument).
  4. Verify the screenshot captures the full page,

Opened via Open Issue Fixer · AI-assisted. Please review carefully before merging.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/browser Browser automation (CDP, Playwright) tool/vision Vision analysis and image generation labels May 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #19647 — same fix (add full_page param to browser_vision) for #19620.

@alt-glitch alt-glitch added the duplicate This issue or pull request already exists label May 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #19647 — same fix (add full_page param to browser_vision) for #19620.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #19647

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for isolating a real browser-vision failure: current main still unconditionally appends --full on the normal screenshot path (tools/browser_tool.py:4017-4022).

Problems

  • The new parameter is not agent-callable. Current schema exposes only question and annotate (tools/browser_tool.py:1933-1944), and the registry forwards only those fields (tools/browser_tool.py:4792).
  • Current browser_vision also has Camofox delegation (tools/browser_tool.py:3911-3913) and a Lightpanda-to-Chrome fallback with separate screenshot args (tools/browser_tool.py:3963-3968); this old-context patch does not define or test full_page behavior for them.
  • The PR adds no regression coverage; existing argument coverage is in tests/tools/test_browser_console.py:305-344.

Suggested changes

  • Add and forward full_page through the schema and registry, then cover normal, Lightpanda, and Camofox behavior with current-path tests.

Automated hermes-sweeper review.

Comment thread tools/browser_tool.py
@@ -2344,7 +2344,7 @@ def browser_get_images(task_id: Optional[str] = None) -> str:
}, ensure_ascii=False)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a Python-only parameter, but the model-facing schema and registry handler are not updated. full_page must be added to BROWSER_TOOL_SCHEMAS and forwarded by the browser_vision registration; otherwise tool calls cannot request viewport-only capture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform tool/browser Browser automation (CDP, Playwright) tool/vision Vision analysis and image generation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants