跳到正文
← 今日

Anthropic ·

AnthropicBedrock 将用户画像 ID移入请求体

使用 AnthropicBedrock 或 AsyncAnthropicBedrock 发送 Messages 请求时,用户画像 ID现在会放入请求体;不支持用户画像的模型会返回 400 错误。

之前此前,Amazon Bedrock 会忽略请求头中的用户画像 ID。
现在现在,两个客户端会将用户画像 ID移入 Messages 请求体。

你需要知道的

  • 两个客户端会把用户画像 ID放入请求体,并停止发送对应请求头。
  • 请求体已有 user_profile_id 时,会优先使用请求体中的值。
  • 不支持用户画像的模型收到该 ID时会返回 400 错误。

原文怎么说

Features * api: add the image_dimensions_too_large error code Bug Fixes * bedrock: send the user profile ID in the request body Amazon Bedrock reads user_profile_id from the request body and ignores the anthropic-user-profile-id header, so a profile ID given to AnthropicBedrock or AsyncAnthropicBedrock was not applied. Both clients now move it into the body of Messages requests and no longer send the header. A user_profile_id already in the body takes priority over the header. Some models on Bedrock do not support

github.com · 发布于 2026-11-20 · 打开原文 ↗