Skip to content

Conversation

@danilop
Copy link
Contributor

@danilop danilop commented Dec 16, 2025

Description

This PR adds support for web-based and search result citations in the Bedrock Converse API, completing support for all citation location types.

New Features:

  • WebLocation type for web-based citations (url, domain)
  • SearchResultLocation type for search result citations (searchResultIndex, start, end)
  • Updated _format_citation_location to handle all 5 location types

Once #1154 is merged, this feature will allow Anthropic Bedrock models to return citations generated using server side tools. Of course, for custom model implementations, builders can begin using this immediately.

Dependencies

This PR depends on #1343 (fix: Preserve tagged union structure for CitationLocation) which must be merged first.

Related Issues

Fixes #1345

Type of Change

New feature

Testing

  • I ran hatch run prepare (1618 tests pass)
  • Tests for web citations
  • Tests for search result citations
  • Tests for field filtering

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dbschmigelski dbschmigelski merged commit 3d03a35 into strands-agents:main Dec 19, 2025
15 of 16 checks passed
JackYPCOnline pushed a commit to CrysisDeu/sdk-python that referenced this pull request Dec 19, 2025
…#1344)

Co-authored-by: Dean Schmigelski <dbschmigelski+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add support for web and search result citations in Bedrock

4 participants