[FEATURE] Extend shared native LLM content and usage contracts to Bedrock
Python PR scope
Add a Bedrock Converse fixture to the shared provider contracts, preserving its content-block representation while testing common text, multimodal, and usage behavior.
Difficulty: medium. Allocation index: #8118. Project: #8006.
Cohort allocation
This ticket is reserved for maintainer-coordinated allocation to the Stanford semester collaboration. Please wait for @lorenzejay to confirm an assignee before implementing. A comment expresses interest; it does not establish ownership. Public good first issue / help wanted discovery labels will be considered after cohort allocation.
GitHub usernames have not yet been supplied, so no individual assignment is implied.
Acceptance criteria
- [ ] Use fake Converse responses for string, parts-list, and None content cases.
- [ ] Test model-visible text and multimodal blocks without stringifying content lists.
- [ ] Test token usage and returned text on sync/async paths without AWS credentials.
- [ ] Keep Bedrock's provider-specific semantics in its fixture and share only true common expectations.
- [ ] Coordinate already-tracked multimodal/finish-reason fixes and avoid competing runtime implementations.
Dependencies and coordination
- Coordinate with shared suites in #8037/#8039/#8062; existing Bedrock formatter work includes #7930.
Starting points
- lib/crewai/src/crewai/llms/providers/bedrock/completion.py
- lib/crewai/tests/llms/bedrock
- lib/crewai/tests/llms
Submission
The contributor implements this scope and submits one focused PR linked to this open issue. Include full Python annotations, behavioral tests, and relevant quality checks. No paid API calls are required for the tests. Preserve existing APIs outside the scoped feature. For newly found defects, reproduce them and check active issues/PRs before fixing them. Docs edits, when needed, belong under docs/edge/ and must sync ar, ko, pt-BR per DOCS_TRANSLATIONS.md. Follow .github/CONTRIBUTING.md. Issue prepared with AI assistance.
Hi @lorenzejay — I'd like to be considered for this slot.
I'm a returning contributor to crewAI (merged #7903 and #7936; open PR #7947 awaiting maintainer review). I'm comfortable with the Bedrock Converse path and the shared-contract test pattern, and I'm happy to coordinate with #8037/#8039/#8062 and #7930 to avoid duplicate work.
Plan if allocated:
- Add a hermetic Bedrock Converse fixture (fake boto3 Session/client) covering string, parts-list, and None content, plus token usage — no AWS creds.
- Register Bedrock in the shared parametrized contract suites once they land, keeping Converse content-block semantics in the fixture.
- Cover sync/async parity, system-prompt slot, empty-text handling, and LLMCallStarted/Completed events.
Please let me know if a slot is available or if there's a preferred username/format for allocation. Thanks!
Hi maintainers,
I'd be interested in contributing to the Bedrock shared content and usage contract tests. The mocked, credential-free test scope—covering text and multimodal responses, token usage, and sync/async behavior—looks like a useful contribution.
I understand this issue is reserved for maintainer-coordinated Stanford cohort allocation, and another contributor has already expressed interest. I don't want to duplicate their work or assume this issue is available.
Would an external contributor be eligible for allocation here, or is there a smaller unallocated testing task I could help with? I'm happy to coordinate on scope and wait for explicit approval before implementing anything.
Thanks!
Hi @lorenzejay ! I'm in the Stanford cohort. Can I take this one?