You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Bedrock modelconfig allow to configure Claude settingsΒ #1721
I have searched the existing issues to avoid creating a duplicate
By submitting this issue, you agree to follow our Code of Conduct
π Feature Summary
Allow for Bedrock models to configure specific settings
β Problem Statement / Motivation
When running kagent with Claude 4.6 on Bedrock token consumption is massive compared to using claude code. It would be great if we can configure settings like effort and such.
π‘ Proposed Solution
It would be great if following could be configured.
Maybe context caching is not setup and working in your bedrock setup? You might want to setup agentgateway or LiteLLM in between kagent and bedrock, I think you can use it to tweak the requests to enable context caching.
Maybe context caching is not setup and working in your bedrock setup? You might want to setup agentgateway or LiteLLM in between kagent and bedrock, I think you can use it to tweak the requests to enable context caching.
Interesting, any pointers to articles or repository that does such thing?
What about doing something like a AnthropicModel CR that allows to configure Anthropic specific settings so e.g. Haiku and Sonnet and Opus can be combined in a agent. E.g. using Haiku for tool invocation, and Sonnet/Opus for interpreting and such?
I struggle to wrap my head around doing something useful with just Haiku at the moment. E.g. a K8s Agent with Haiku at the moment doesn't work for pretty basic questions like.
Give me all the crashing pods in the last 8 hours and the root cause.
It will simply run out of tokens.
But if we can combine Haiku and Sonnet in the same pod we might have it use Haiku for tools and Sonnet to do the reasoning. That might be a massive cost saver.
Not deep enough in the project yet, so above might be just a unfeasible brainfart.
The Bedrock integration in kagent uses the Bedrock Converse API (via boto3), which provides a unified interface across all Bedrock-supported models. However, the implementation does not include any support for prompt caching, which is an Anthropic API feature.
The relevant code shows that:
The Bedrock client only passes standard Converse API parameters like temperature, maxTokens, topP, and stopSequences
There is no handling for cache-related parameters or headers
The extra_headers field in the Bedrock configuration explicitly notes it's not supported and logs a warning
Why This Matters for Your Issue
Related to issue #1721 you referenced, this is actually a compounding factor in the token consumption problem:
No prompt caching - Context caching for Claude models (which can save 10-25% of tokens) isn't available
Converse API limitations - Unlike the native Anthropic API, Bedrock's Converse API doesn't expose all Claude-specific features
No effort/thinking configuration - As mentioned in your issue, model settings like effort level and extended thinking also aren't configurable
Very unfortunate because context caching is a huge cost saver. Probably makes bedrock a very unattractive LLM provider option if it doesn't easily support it.
Activity
dobesv commentedon Apr 22, 2026
Maybe context caching is not setup and working in your bedrock setup? You might want to setup agentgateway or LiteLLM in between kagent and bedrock, I think you can use it to tweak the requests to enable context caching.
marcofranssen commentedon Apr 22, 2026
Interesting, any pointers to articles or repository that does such thing?
marcofranssen commentedon Apr 22, 2026
What about doing something like a AnthropicModel CR that allows to configure Anthropic specific settings so e.g. Haiku and Sonnet and Opus can be combined in a agent. E.g. using Haiku for tool invocation, and Sonnet/Opus for interpreting and such?
I struggle to wrap my head around doing something useful with just Haiku at the moment. E.g. a K8s Agent with Haiku at the moment doesn't work for pretty basic questions like.
It will simply run out of tokens.
But if we can combine Haiku and Sonnet in the same pod we might have it use Haiku for tools and Sonnet to do the reasoning. That might be a massive cost saver.
Not deep enough in the project yet, so above might be just a unfeasible brainfart.
dobesv commentedon Apr 22, 2026
Here's what CoPilot has to say about it:
Current State
The Bedrock integration in kagent uses the Bedrock Converse API (via boto3), which provides a unified interface across all Bedrock-supported models. However, the implementation does not include any support for prompt caching, which is an Anthropic API feature.
The relevant code shows that:
Why This Matters for Your Issue
Related to issue #1721 you referenced, this is actually a compounding factor in the token consumption problem:
dobesv commentedon Apr 22, 2026
Very unfortunate because context caching is a huge cost saver. Probably makes bedrock a very unattractive LLM provider option if it doesn't easily support it.
feat(bedrock): add top_k and extended thinking support for Claude modβ¦