Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/google/adk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
# Gemma 3 only (function-calling workarounds). Gemma 4+ resolves to Gemini.
'Gemma': ([r'gemma-.*'], 'gemma_llm'),
'ApigeeLlm': ([r'apigee\/.*'], 'apigee_llm'),
'Claude': ([r'claude-3-.*', r'claude-.*-4.*'], 'anthropic_llm'),
'Claude': (
[r'claude-3-.*', r'claude-.*-4.*', r'claude-.*-5.*'],
'anthropic_llm',
),
'Gemma3Ollama': ([r'ollama/gemma3.*'], 'gemma_llm'),
'OpenAILlm': (
[r'gpt-.*', r'o\d+-.*'],
Expand Down
2 changes: 1 addition & 1 deletion src/google/adk/models/anthropic_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class AnthropicLlm(BaseLlm):
@classmethod
@override
def supported_models(cls) -> list[str]:
return [r"claude-3-.*", r"claude-.*-4.*"]
return [r"claude-3-.*", r"claude-.*-4.*", r"claude-.*-5.*"]

def _resolve_model_name(self, model: Optional[str]) -> str:
if not model:
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/models/test_anthropic_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ def test_claude_anthropic_client_creation_with_full_resource_name():

def test_supported_models():
models = Claude.supported_models()
assert len(models) == 2
assert len(models) == 3
assert models[0] == r"claude-3-.*"
assert models[1] == r"claude-.*-4.*"
assert models[2] == r"claude-.*-5.*"


function_declaration_test_cases = [
Expand Down
9 changes: 9 additions & 0 deletions tests/unittests/models/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ def test_match_gemini_family(model_name):
'claude-3-sonnet@20240229',
'claude-sonnet-4@20250514',
'claude-opus-4@20250514',
'claude-sonnet-4-5',
'claude-haiku-4-5',
'claude-sonnet-4-6',
'claude-opus-4-6',
'claude-opus-4-7',
'claude-opus-4-8',
'claude-opus-5',
'claude-sonnet-5',
'claude-fable-5',
],
)
def test_match_claude_family(model_name):
Expand Down