Skip to content
Open
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
26 changes: 26 additions & 0 deletions src/google/adk/models/lite_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2038,8 +2038,34 @@ def supported_models(cls) -> list[str]:
return [
# For OpenAI models (e.g., "openai/gpt-4o")
r"openai/.*",
# For Azure OpenAI models (e.g., "azure/gpt-4o")
r"azure/.*",
# For Azure AI models (e.g., "azure_ai/command-r-plus")
r"azure_ai/.*",
# For Groq models via Groq API (e.g., "groq/llama3-70b-8192")
r"groq/.*",
# For Anthropic models (e.g., "anthropic/claude-3-opus-20240229")
r"anthropic/.*",
# For AWS Bedrock models (e.g., "bedrock/anthropic.claude-3-sonnet")
r"bedrock/.*",
# For Ollama models (e.g., "ollama/llama3")
r"ollama/.*",
# For Ollama chat models (e.g., "ollama_chat/llama3")
r"ollama_chat/.*",
# For Together AI models (e.g., "together_ai/meta-llama/Llama-3-70b")
r"together_ai/.*",
# For Vertex AI non-Gemini models (e.g., "vertex_ai/claude-3-sonnet")
r"vertex_ai/.*",
# For Mistral AI models (e.g., "mistral/mistral-large-latest")
r"mistral/.*",
# For DeepSeek models (e.g., "deepseek/deepseek-chat")
r"deepseek/.*",
# For Fireworks AI models (e.g., "fireworks_ai/llama-v3-70b")
r"fireworks_ai/.*",
# For Cohere models (e.g., "cohere/command-r-plus")
r"cohere/.*",
# For Databricks models (e.g., "databricks/dbrx-instruct")
r"databricks/.*",
# For AI21 models (e.g., "ai21/jamba-1.5-large")
r"ai21/.*",
Comment on lines +2041 to +2070
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The regular expression patterns for the supported models are added sequentially. Consider grouping them by category (e.g., Azure, AWS, etc.) to improve readability and maintainability.

Comment on lines 2039 to +2070
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better readability and long-term maintainability, it would be beneficial to sort this list of provider patterns alphabetically by provider name. This makes it easier to find specific providers and to see which ones are already included when adding new ones in the future.

        # For AI21 models (e.g., "ai21/jamba-1.5-large")
        r"ai21/.*",
        # For Anthropic models (e.g., "anthropic/claude-3-opus-20240229")
        r"anthropic/.*",
        # For Azure OpenAI models (e.g., "azure/gpt-4o")
        r"azure/.*",
        # For Azure AI models (e.g., "azure_ai/command-r-plus")
        r"azure_ai/.*",
        # For AWS Bedrock models (e.g., "bedrock/anthropic.claude-3-sonnet")
        r"bedrock/.*",
        # For Cohere models (e.g., "cohere/command-r-plus")
        r"cohere/.*",
        # For Databricks models (e.g., "databricks/dbrx-instruct")
        r"databricks/.*",
        # For DeepSeek models (e.g., "deepseek/deepseek-chat")
        r"deepseek/.*",
        # For Fireworks AI models (e.g., "fireworks_ai/llama-v3-70b")
        r"fireworks_ai/.*",
        # For Groq models via Groq API (e.g., "groq/llama3-70b-8192")
        r"groq/.*",
        # For Mistral AI models (e.g., "mistral/mistral-large-latest")
        r"mistral/.*",
        # For Ollama models (e.g., "ollama/llama3")
        r"ollama/.*",
        # For Ollama chat models (e.g., "ollama_chat/llama3")
        r"ollama_chat/.*",
        # For OpenAI models (e.g., "openai/gpt-4o")
        r"openai/.*",
        # For Together AI models (e.g., "together_ai/meta-llama/Llama-3-70b")
        r"together_ai/.*",
        # For Vertex AI non-Gemini models (e.g., "vertex_ai/claude-3-sonnet")
        r"vertex_ai/.*",

]
Loading