Skip to content

fix(browser): make get_html truncation configurable instead of hard-coded 1000 chars#504

Open
wangwangbobo wants to merge 1 commit into
strands-agents:mainfrom
wangwangbobo:wangwangbobo/fix-get-html-max-length
Open

fix(browser): make get_html truncation configurable instead of hard-coded 1000 chars#504
wangwangbobo wants to merge 1 commit into
strands-agents:mainfrom
wangwangbobo:wangwangbobo/fix-get-html-max-length

Conversation

@wangwangbobo

Copy link
Copy Markdown
Contributor

Summary

Fixes #407 - hard-coded 1,000-character truncation returns broken HTML fragments.

Changes

  • Add parameter to (optional, defaults to = full HTML)
  • Remove hard-coded 1000-char truncation - now returns full HTML by default
  • Callers can opt-in to truncation at a custom limit via

Why

The hard-coded 1000-char limit makes unusable for any pipeline that needs full page content (HTML-to-markdown conversion, etc.). This is a backward-compatible change - existing callers who want truncation can pass explicitly.

Changes

  • : Added field
  • : Replaced hard-coded truncation with conditional logic

…oded 1000 chars

- Add optional max_length parameter to GetHtmlAction (defaults to None = full HTML)
- Remove hard-coded 1000-char truncation, return full HTML by default
- Fixes strands-agents#407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] get_html hard-coded 1,000-character truncation returns broken HTML fragments

1 participant