Unsupported model error when using Bedrock Anthropic (Claude) with MCP tools
Los mantenedores suelen responder en 1 día
@hemasekhar-p ya está trabajando en esto.
Desde el 4/5/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 1.7k
- Forks
- 421
- Merge medio
- 3 d 14 h
- PR fusionados (30 d)
- 31
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/adk-java
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Approved tool call re-runs on every later user turn if it never got a function responsePosiblemente ocupada @hemasekhar-p la tomó hace 3 días. Abiertoneeds review
google/adk-java#1556 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
LocalSkillSource.listResources returns backslash-separated paths on WindowsPosiblemente ocupada @hemasekhar-p la tomó hace 3 días. Abiertoneeds review
google/adk-java#1541 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Context caching (ContextCacheConfig) is a silent no-op: config is plumbed to InvocationContext but never readPosiblemente ocupada @hemasekhar-p la tomó hace 5 días. Abiertoneeds review
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
google/adk-java#1530 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de google/adk-java
Issues similares
-
P2 testing
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
area/core kind/bug status/triage team/core-shared
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
checkstyle/checkstyle#21755 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
spring-projects/spring-integration#11495 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día