mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Support models slash prefix in model name extraction
Support "models/" prefix in model name extraction PiperOrigin-RevId: 827557443
This commit is contained in:
committed by
Copybara-Service
parent
92a7d19573
commit
8dff85099d
@@ -42,6 +42,11 @@ class TestExtractModelName:
|
||||
path_model_3 = 'projects/test-project/locations/europe-west1/publishers/google/models/claude-3-sonnet'
|
||||
assert extract_model_name(path_model_3) == 'claude-3-sonnet'
|
||||
|
||||
def test_extract_model_name_with_models_prefix(self):
|
||||
"""Test extraction of model names with 'models/' prefix."""
|
||||
assert extract_model_name('models/gemini-2.5-pro') == 'gemini-2.5-pro'
|
||||
assert extract_model_name('models/gemini-1.5-flash') == 'gemini-1.5-flash'
|
||||
|
||||
def test_extract_model_name_invalid_path(self):
|
||||
"""Test that invalid path formats return the original string."""
|
||||
invalid_paths = [
|
||||
|
||||
Reference in New Issue
Block a user