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:
Anmol Jaiswal
2026-02-13 13:47:13 -08:00
committed by Copybara-Service
co-authored by George Weale
parent fbe9eccd05
commit d5332f4434
2 changed files with 34 additions and 0 deletions
+8
View File
@@ -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",
[