Sibling change to the anthropic_messages adapter, this time for the SDK-based path that talks to the official Anthropic endpoint via anthropic-sdk-go. The Messages API there is the same shape, so the fix is identical: wrap user content with messageutil.ApplyUserNamePrefix when the message carries Name attribution; tool result blocks pass through unchanged. The prefix is applied at marshal time only; the persisted message is not mutated. Existing single-user / direct-channel flows are unaffected because Name is empty there. Existing provider tests continue to pass; behavior is exercised by the messageutil unit tests (which cover ApplyUserNamePrefix exhaustively) and the agent-level integration tests added earlier. Refs #2702. |
||
|---|---|---|
| .. | ||
| provider.go | ||
| provider_test.go | ||
| thinking_test.go | ||