AWS Bedrock models - error about prompt caching #7379
Replies: 1 comment
|
Thanks for the detailed write-up, @robertkern — listing the exact model IDs that work and fail made this easy to trace, and the Bedrock side is quick to confirm. The error is Bedrock rejecting a cache checkpoint on a model that doesn't support prompt caching. In 2.7.1, Onyx's prompt cache picked the Anthropic adapter for every Bedrock model ( Checked directly against the Bedrock Converse API in us-east-1, same prompt, only the
Two notes for after upgrading:
Reproduction and codeAdapter selection, v2.7.1 vs after #7435 ( # v2.7.1
elif provider in [LlmProviderNames.ANTHROPIC, LlmProviderNames.BEDROCK]:
return AnthropicPromptCacheProvider()
# main
elif llm_config.model_provider == LlmProviderNames.ANTHROPIC or (
llm_config.model_provider == LlmProviderNames.BEDROCK
and ANTHROPIC_BEDROCK_TAG in llm_config.model_name # "anthropic."
):
return AnthropicPromptCacheProvider() |
Uh oh!
There was an error while loading. Please reload this page.
Hey we're testing out Onyx internally and really impressed with the system so far.
I have been able to get responses with some Anthropic models via AWS Bedrock but I haven't had success with any other models so wanting to know if others are experiencing the same or is it a me problem.
We're on Onyx version 2.7.1
I'm only looking at serverless models, not marketplace ones.
Above is the error shown in the stacktrace.
Models that are working:
us.anthropic.claude-opus-4-5-20251101-v1:0us.anthropic.claude-sonnet-4-5-20250929-v1:0Examples of models that are not working:
google.gemma-3-12b-itus.anthropic.claude-3-sonnet-20240229-v1:0They all seem to give me that unsupported model or your request did not allow prompt caching error.
Thanks!
All reactions