picoclaw/pkg/providers/bedrock
maxiaoyang 5b0634286c feat(providers/bedrock): prefix user content with sender name
Bedrock's Converse API multiplexes Claude, Llama, Titan, Mistral and
others through a single content-block protocol. None of those families
expose a per-message author identity in a unified way, so prefixing in
the text content block keeps multi-user attribution consistent
regardless of which underlying model the request lands on.

buildUserContent now passes msg through messageutil.ApplyUserNamePrefix
before constructing the text ContentBlockMemberText. Tool result paths
go through a separate code path (toolResultBlock) and are unaffected.
Image media handling is unchanged.

Tests:
- buildUserContent with Name set produces the prefixed text block
- buildUserContent without Name preserves byte-identical behavior
- existing image and base64 cases continue to pass

The Bedrock build is gated behind //go:build bedrock so this path is
only exercised in builds that opt in via that tag.

Refs #2702.
2026-04-29 21:05:07 +08:00
..
provider_bedrock.go feat(providers/bedrock): prefix user content with sender name 2026-04-29 21:05:07 +08:00
provider_bedrock_test.go feat(providers/bedrock): prefix user content with sender name 2026-04-29 21:05:07 +08:00
provider_stub.go feat(providers): add AWS Bedrock provider (#1903) 2026-03-24 01:10:56 +08:00
provider_stub_test.go feat(providers): add AWS Bedrock provider (#1903) 2026-03-24 01:10:56 +08:00