Skip to content

Conversation

@clutchski
Copy link

Summary

  • Bedrock now routes anthropic.* models through the Anthropic Messages API (/invoke, /invoke-with-response-stream) while non-Anthropic models (amazon., meta., etc.) continue using the Converse API
  • Router uses spec.format instead of provider.format() for request transformation, allowing a single provider to serve models with different formats via add_provider_for_format()
  • Updated catalog: all anthropic.* Bedrock models now have format "anthropic" instead of "converse"

Test plan

  • Unit tests: mode detection, URL generation, payload preparation, multi-format provider routing
  • cargo test and cargo clippy clean
  • Integration tests pass with gateway (35/35)

🤖 Generated with Claude Code

…sages API

Bedrock now routes anthropic.* models through the Anthropic Messages API
(/invoke, /invoke-with-response-stream) while non-Anthropic models continue
using the Converse API. This enables full Anthropic feature support (extended
thinking, prompt caching, etc.) for Claude models on Bedrock.

Key changes:
- Router uses spec.format instead of provider.format() for request transformation
- Add add_provider_for_format() to let one provider serve multiple formats
- BedrockProvider detects mode from model name and switches URL/payload accordingly
- New bedrock_messages_event_stream for invoke-with-response-stream decoding
- Update catalog: anthropic.* Bedrock models now have format "anthropic"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@clutchski clutchski force-pushed the matt/bedrock-composite branch from bb26d61 to 9f3cf0a Compare February 5, 2026 20:52
@clutchski clutchski requested review from knjiang and remh February 5, 2026 21:03
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