Unsupported model error when using Bedrock Anthropic (Claude) with MCP tools
@hemasekhar-p ci sta già lavorando.
Dal 4/5/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the Bug:
When using a Bedrock-backed Anthropic Claude model via SpringAI, the model works correctly without tools. However, when MCP tools are added to the LlmAgent, the execution fails with Unsupported model from LlmRegistry.
This suggests that tool-enabled flows rely on LlmRegistry, which does not recognize non-Gemini models such as Bedrock Anthropic.
Steps to Reproduce:
1. Create a Bedrock ChatModel:
BedrockProxyChatModel.builder()
.region(Region.of(config.getLocation()))
.bedrockRuntimeClient(bedrockClient)
.bedrockRuntimeAsyncClient(bedrockAsyncClient)
.defaultOptions(options)
.build();
2. Create an LlmAgent WITHOUT tools:
LlmAgent llmAgent = LlmAgent.builder()
.name("McpTestClient")
.model(new SpringAI(chatModel, "us.anthropic.claude-sonnet-4-5-20250929-v1:0"))
.description(".....")
.instruction(".....")
.build();
3. Execute using runner:
InMemoryRunner runner = new InMemoryRunner(llmAgent);
Session session = runner.sessionService()
.createSession(runner.appName(), "user1")
.blockingGet();
Content userMsg = Content.fromParts(
Part.fromText("What is the capital of France ?")
);
Flowable<Event> events =
runner.runAsync(session.userId(), session.id(), userMsg);
events.blockingForEach(event ->
System.out.println(event.stringifyContent())
);
THIS WORKS AS EXPECTED
4. Add MCP tools:
LlmAgent.builder()
.name("McpTestClient")
.model(new SpringAI(chatModel, "us.anthropic.claude-sonnet-4-5-20250929-v1:0"))
.description(".....")
**.tools(mcptools)**
.instruction(".....")
.build();
5. Run the same flow
Expected Behavior:
MCP tools should work with Bedrock Anthropic models the same way they work with Gemini models, since the base model invocation works correctly.
Observed Behavior:
Execution fails with:
IllegalArgumentException: Unsupported model: us.anthropic.claude-sonnet-4-5-20250929-v1:0
The exception originates from:
com.google.adk.models.LlmRegistry.createLlm()
Environment Details:
ADK Library Version: 1.2.0
OS: Linux
TS Version: N/A
Model Information:
Model used: us.anthropic.claude-sonnet-4-5-20250929-v1:0
Provider: AWS Bedrock (Anthropic Claude)
Logs:
java.lang.IllegalArgumentException: Unsupported model: us.anthropic.claude-sonnet-4-5-20250929-v1:0
at com.google.adk.models.LlmRegistry.createLlm(LlmRegistry.java:91)
Additional Context:
The same model works correctly when tools are NOT used
The failure only occurs when .tools(...) is added to LlmAgent
Initial investigation suggests LlmRegistry only supports Gemini models
Non-Gemini providers (Bedrock / Anthropic) are not registered
This raises the question:
Is tool support currently limited to Gemini models?
Should Bedrock / Anthropic models be supported in LlmRegistry?
Minimal Reproduction Code:
LlmAgent.builder()
.name("McpTestClient")
.model(new SpringAI(chatModel, "us.anthropic.claude-sonnet-4-5-20250929-v1:0"))
.tools(mcptools)
.build();
How often has this issue occurred?:
Always
- Lingua principale
- Java
- Stelle
- 1.7k
- Fork
- 421
- Merge medio
- 3g 8h
- PR unite (30g)
- 36
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di google/adk-java
-
needs review
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
needs review
-
needs review
-
needs review
-
needs review
Tutte le issue di google/adk-java
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·