tests: harness tests for bedrock documents - #5949
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR adds Bedrock document-upload regression coverage to the provider harness. Tests cover format detection, data URLs, explicit file types, PDF fallback, remote files, streaming responses, and native Converse document requests. ChangesBedrock document coverage
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
tejas ghatte seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/e2e/api/collections/provider-harness.json`:
- Around line 49121-49128: Update both remote-file tests at
tests/e2e/api/collections/provider-harness.json:49121-49128 and :49336-49343 to
use the same controlled remote fixture containing a unique marker, then assert
the parsed response content includes that marker. Replace the current generic
nonempty-content-only verification in both test cases while preserving their
respective response parsing and endpoint behavior.
- Around line 49210-49370: Update the Bedrock entry in the provider capabilities
configuration so providers.bedrock.responses is true, preserving the existing
Responses and ResponsesStream capability declarations and matching the
BedrockProvider implementation.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b51fa650-0378-478f-a6ab-0d4a9a060cfd
📒 Files selected for processing (2)
tests/e2e/api/HARNESS_COVERAGE_BACKLOG.mdtests/e2e/api/collections/provider-harness.json
a5f6ede to
f9b058d
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
tests/e2e/api/collections/provider-harness.json (1)
49282-49289: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winThis assertion is close to vacuous on the
/v1/responsesroute.On
/v1/responsesthe response has nochoices, socbecomesJSON.stringify(j.output). An emptyoutputarray is truthy and stringifies to"[]", which is a nonempty string. The.not.emptycheck therefore passes even when the model returned no content. The case then only assertsstatus < 400.The fixture decodes to
code,revenue/BIFROST7788,42. Assert the marker instead, and change the prompt to request the verification code.🐛 Proposed fix
- " pm.expect(c).to.be.a('string').and.not.empty;", - " // content-only assertion: this case pins format resolution, not document text", + " pm.expect(c.toUpperCase(), 'model did not read the document contents').to.include('BIFROST7788');",Also change the request prompt from
Summarize this document in one sentence.toReply with only the verification code found in the attached document.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/e2e/api/collections/provider-harness.json` around lines 49282 - 49289, Update the `/v1/responses` test around the “document accepted and answered” assertion to request only the verification code found in the attached document, replacing the summarization prompt. Replace the vacuous nonempty `c` check with an assertion that the extracted response content contains the fixture’s expected marker `BIFROST7788`, while preserving the existing successful-status assertion.
🧹 Nitpick comments (1)
tests/e2e/api/collections/provider-harness.json (1)
48901-48908: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winFour cases use the "content-only assertion" pattern although their fixtures embed
BIFROST7788. The shared root cause is that these cases assert only a nonempty answer. They therefore prove that Bedrock accepted the document, not that Claude parsed it. On the/v1/responsescase the check is weaker still, becauseJSON.stringify(j.output)returns"[]"for an empty output array and passes the nonempty check.
tests/e2e/api/collections/provider-harness.json#L48901-L48908: assertBIFROST7788against the XLSX fixture and change the prompt to request the verification code.tests/e2e/api/collections/provider-harness.json#L48956-L48963: assertBIFROST7788against the CSV fixture and change the prompt to request the verification code.tests/e2e/api/collections/provider-harness.json#L49066-L49073: assertBIFROST7788against the PDF fixture and change the prompt to request the verification code.tests/e2e/api/collections/provider-harness.json#L49282-L49289: assertBIFROST7788against the CSV fixture, change the prompt to request the verification code, and drop the.not.emptycheck that"[]"satisfies.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/e2e/api/collections/provider-harness.json` around lines 48901 - 48908, Update the four content-only assertions in tests/e2e/api/collections/provider-harness.json at lines 48901-48908, 48956-48963, 49066-49073, and 49282-49289: change each prompt to request the fixture’s verification code and assert that the extracted response content contains BIFROST7788. For the /v1/responses case at lines 49282-49289, remove the .not.empty check so an empty serialized output cannot pass; retain the response-success validation and use a content assertion that verifies the code.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/e2e/api/collections/provider-harness.json`:
- Around line 49141-49143: Replace the external Berkshire Hathaway file URL in
both remote-file cases with a repository-hosted or {{baseUrl}} fixture
containing the marker BIFROST7788. Update
tests/e2e/api/collections/provider-harness.json lines 49141-49143 and
49356-49358, covering the chat messages file case and the /v1/responses
input_file case.
- Around line 49176-49180: Update the streaming test in the pm.test block to
parse SSE payloads, extract and concatenate choices[].delta.content values, and
assert the combined streamed document includes BIFROST7788. Keep the existing
response status, data presence, and error-frame assertions unchanged.
---
Duplicate comments:
In `@tests/e2e/api/collections/provider-harness.json`:
- Around line 49282-49289: Update the `/v1/responses` test around the “document
accepted and answered” assertion to request only the verification code found in
the attached document, replacing the summarization prompt. Replace the vacuous
nonempty `c` check with an assertion that the extracted response content
contains the fixture’s expected marker `BIFROST7788`, while preserving the
existing successful-status assertion.
---
Nitpick comments:
In `@tests/e2e/api/collections/provider-harness.json`:
- Around line 48901-48908: Update the four content-only assertions in
tests/e2e/api/collections/provider-harness.json at lines 48901-48908,
48956-48963, 49066-49073, and 49282-49289: change each prompt to request the
fixture’s verification code and assert that the extracted response content
contains BIFROST7788. For the /v1/responses case at lines 49282-49289, remove
the .not.empty check so an empty serialized output cannot pass; retain the
response-success validation and use a content assertion that verifies the code.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a8cb0e2-e50c-4952-8d1c-030399a0cd27
📒 Files selected for processing (1)
tests/e2e/api/collections/provider-harness.json
Merge activity
|
9cf7426 to
29c18f3
Compare
f9b058d to
19a9973
Compare
The base branch was changed.
Adds regression coverage for #5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes #5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
Adds regression coverage for #5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes #5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
Adds regression coverage for #5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes #5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
Adds regression coverage for #5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes #5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
Adds regression coverage for #5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes #5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
Adds regression coverage for maximhq#5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (maximhq#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (maximhq#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes maximhq#5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
Adds regression coverage for maximhq#5472, where Bedrock's document format converter defaulted every uploaded document to `format:"pdf"` regardless of the actual file type, causing AWS to reject non-PDF documents with `ValidationException`. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both `/v1/chat/completions` and `/v1/responses`. - Added folder **42. Bedrock Document Uploads via OpenAI type:"file" (maximhq#5472)** to the provider harness collection with 14 test cases: - Cases 1–11 exercise `/v1/chat/completions` with XLSX, DOCX, CSV, PDF, TXT, and `file_url` inputs, covering format resolution by data URL media type, filename extension, explicit `file_type`, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming - Cases 12–14 pin the same invariants on `/v1/responses` `input_file` blocks (XLSX data URL, CSV data URL, `file_url`) - Every fixture embeds the token `BIFROST7788` so assertions confirm the document was actually parsed by Claude, not merely accepted - Updated `HARNESS_COVERAGE_BACKLOG.md` to mark the **Document input** item as partially covered (`[~]`), noting that the OpenAI `type:"file"` / Responses `input_file` path is now covered by folder 42, while a native Converse-shaped `document` block posted directly at `/bedrock/model/{id}/converse` remains uncovered - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [x] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs Import `tests/e2e/api/collections/provider-harness.json` into Postman and run folder **42. Bedrock Document Uploads via OpenAI type:"file" (maximhq#5472)** against a running Bifrost instance with Bedrock credentials configured. Each test asserts: - The response does not contain `"The PDF specified was not valid"`, `"could not be parsed as the specified format"`, or `"The document source bytes"` (the AWS rejection messages from the bug) - The response status is below 400 - For document-content cases, the model's reply includes `BIFROST7788`, confirming the document was read Before the fix, cases 1–3, 5–8, and 12–14 all returned a 400 `ValidationException`. - [x] No Closes maximhq#5472 None. Test fixtures contain only synthetic document content with no real credentials or PII. - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Adds regression coverage for #5472, where Bedrock's document format converter defaulted every uploaded document to
format:"pdf"regardless of the actual file type, causing AWS to reject non-PDF documents withValidationException. This PR adds 14 end-to-end test cases to the provider harness collection covering the fixed behavior across both/v1/chat/completionsand/v1/responses.Changes
type:"file"— "The PDF specified was not valid" #5472) to the provider harness collection with 14 test cases:/v1/chat/completionswith XLSX, DOCX, CSV, PDF, TXT, andfile_urlinputs, covering format resolution by data URL media type, filename extension, explicitfile_type, charset-parameterized data URLs, non-base64 percent-encoded data URLs, opaque media types, and streaming/v1/responsesinput_fileblocks (XLSX data URL, CSV data URL,file_url)BIFROST7788so assertions confirm the document was actually parsed by Claude, not merely acceptedHARNESS_COVERAGE_BACKLOG.mdto mark the Document input item as partially covered ([~]), noting that the OpenAItype:"file"/ Responsesinput_filepath is now covered by folder 42, while a native Converse-shapeddocumentblock posted directly at/bedrock/model/{id}/converseremains uncoveredType of change
Affected areas
How to test
Import
tests/e2e/api/collections/provider-harness.jsoninto Postman and run folder 42. Bedrock Document Uploads via OpenAI type:"file" (#5472) against a running Bifrost instance with Bedrock credentials configured.Each test asserts:
"The PDF specified was not valid","could not be parsed as the specified format", or"The document source bytes"(the AWS rejection messages from the bug)BIFROST7788, confirming the document was readBefore the fix, cases 1–3, 5–8, and 12–14 all returned a 400
ValidationException.Breaking changes
Related issues
Closes #5472
Security considerations
None. Test fixtures contain only synthetic document content with no real credentials or PII.
Checklist
docs/contributing/README.mdand followed the guidelines