chore: Adding regex for claude-4 models to anthropic_llm and updating tests

Copybara import of the project:

--
824b4379d59a375191f8ce10997efd4021d5d0b3 by Andres Videla <andres.videla@trademe.co.nz>:

Adding regex for claude-4 models to anthropic_llm and updating tests

--
8fa2a2df1931026dc803eee0e9b60e82e90c9efa by Wei Sun (Jack) <Jacksunwei@gmail.com>:

Adds trailing comma.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/934 from avidelatm:feature/add-support-for-claude-4-models-to-anthropic_llm 8d10bacdbec952ec9832180ac6c1d220916641da
PiperOrigin-RevId: 764396694
This commit is contained in:
avidelatm 2025-05-28 13:38:02 -07:00 committed by Copybara-Service
parent c4cd1802bf
commit 7fc09b2c64
2 changed files with 3 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class Claude(BaseLlm):
@staticmethod
@override
def supported_models() -> list[str]:
return [r"claude-3-.*"]
return [r"claude-3-.*", r"claude-.*-4.*"]
@override
async def generate_content_async(

View File

@ -46,6 +46,8 @@ def test_match_gemini_family(model_name):
'claude-3-haiku@20240307',
'claude-3-opus@20240229',
'claude-3-sonnet@20240229',
'claude-sonnet-4@20250514',
'claude-opus-4@20250514',
],
)
def test_match_claude_family(model_name):