mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat: Expand LiteLlm supported models and add registry tests
Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 869873309
This commit is contained in:
committed by
Copybara-Service
co-authored by
George Weale
parent
fbe9eccd05
commit
d5332f4434
@@ -12,6 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from google.adk import models
|
||||
from google.adk.models.gemma_llm import Gemma
|
||||
from google.adk.models.llm_request import LlmRequest
|
||||
from google.adk.models.llm_response import LlmResponse
|
||||
@@ -509,10 +510,17 @@ def test_process_response_last_json_object():
|
||||
# Tests for Gemma3Ollama (only run when LiteLLM is installed)
|
||||
try:
|
||||
from google.adk.models.gemma_llm import Gemma3Ollama
|
||||
from google.adk.models.lite_llm import LiteLlm
|
||||
|
||||
def test_gemma3_ollama_supported_models():
|
||||
assert Gemma3Ollama.supported_models() == [r"ollama/gemma3.*"]
|
||||
|
||||
def test_gemma3_ollama_registry_resolution():
|
||||
assert models.LLMRegistry.resolve("ollama/gemma3:12b") is Gemma3Ollama
|
||||
|
||||
def test_non_gemma_ollama_registry_resolution():
|
||||
assert models.LLMRegistry.resolve("ollama/llama3.2") is LiteLlm
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"model_arg,expected_model",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user