Skip to content

fix: allow duplicate document uploads in a conversation - #290

Merged
kevmyung merged 1 commit into
mainfrom
fix/deduplicate-bedrock-document-names
Sep 8, 2026
Merged

kevmyung merged 1 commit into
mainfrom
fix/deduplicate-bedrock-document-names

Conversation

@kevmyung

@kevmyung kevmyung commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ensure Bedrock document names are unique across conversation history and the current turn
  • rename only colliding model-facing names with numeric suffixes such as report-2
  • cover historical, case-insensitive, and repeated-upload collisions with unit tests

Why

Bedrock rejects Converse requests when multiple document blocks use the same document name. Re-uploading a file in the same conversation therefore caused Agent processing failed.

Testing

  • python -m pytest tests/unit/test_agui_document_names.py tests/unit/test_agui_tool_input_streaming.py -q
  • python -m ruff check src/streaming/agui_event_processor.py tests/unit/test_agui_document_names.py

@kevmyung
kevmyung merged commit 1ef7f6b into main Sep 8, 2026
13 checks passed
@kevmyung
kevmyung deleted the fix/deduplicate-bedrock-document-names branch September 8, 2026 23:57
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.

1 participant