Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
189 changes: 189 additions & 0 deletions pydantic_ai_slim/pydantic_ai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,195 @@
'cohere:command-r7b-12-2024',
'deepseek:deepseek-chat',
'deepseek:deepseek-reasoner',
'gateway/anthropic:claude-3-5-haiku-20241022',
'gateway/anthropic:claude-3-5-haiku-latest',
'gateway/anthropic:claude-3-5-sonnet-20240620',
'gateway/anthropic:claude-3-5-sonnet-20241022',
'gateway/anthropic:claude-3-5-sonnet-latest',
'gateway/anthropic:claude-3-7-sonnet-20250219',
'gateway/anthropic:claude-3-7-sonnet-latest',
'gateway/anthropic:claude-3-haiku-20240307',
'gateway/anthropic:claude-3-opus-20240229',
'gateway/anthropic:claude-3-opus-latest',
'gateway/anthropic:claude-4-opus-20250514',
'gateway/anthropic:claude-4-sonnet-20250514',
'gateway/anthropic:claude-haiku-4-5',
'gateway/anthropic:claude-haiku-4-5-20251001',
'gateway/anthropic:claude-opus-4-0',
'gateway/anthropic:claude-opus-4-1-20250805',
'gateway/anthropic:claude-opus-4-20250514',
'gateway/anthropic:claude-sonnet-4-0',
'gateway/anthropic:claude-sonnet-4-20250514',
'gateway/anthropic:claude-sonnet-4-5',
'gateway/anthropic:claude-sonnet-4-5-20250929',
'gateway/bedrock:amazon.titan-text-express-v1',
'gateway/bedrock:amazon.titan-text-lite-v1',
'gateway/bedrock:amazon.titan-tg1-large',
'gateway/bedrock:anthropic.claude-3-5-haiku-20241022-v1:0',
'gateway/bedrock:anthropic.claude-3-5-sonnet-20240620-v1:0',
'gateway/bedrock:anthropic.claude-3-5-sonnet-20241022-v2:0',
'gateway/bedrock:anthropic.claude-3-7-sonnet-20250219-v1:0',
'gateway/bedrock:anthropic.claude-3-haiku-20240307-v1:0',
'gateway/bedrock:anthropic.claude-3-opus-20240229-v1:0',
'gateway/bedrock:anthropic.claude-3-sonnet-20240229-v1:0',
'gateway/bedrock:anthropic.claude-haiku-4-5-20251001-v1:0',
'gateway/bedrock:anthropic.claude-instant-v1',
'gateway/bedrock:anthropic.claude-opus-4-20250514-v1:0',
'gateway/bedrock:anthropic.claude-sonnet-4-20250514-v1:0',
'gateway/bedrock:anthropic.claude-sonnet-4-5-20250929-v1:0',
'gateway/bedrock:anthropic.claude-v2',
'gateway/bedrock:anthropic.claude-v2:1',
'gateway/bedrock:cohere.command-light-text-v14',
'gateway/bedrock:cohere.command-r-plus-v1:0',
'gateway/bedrock:cohere.command-r-v1:0',
'gateway/bedrock:cohere.command-text-v14',
'gateway/bedrock:eu.anthropic.claude-haiku-4-5-20251001-v1:0',
'gateway/bedrock:eu.anthropic.claude-sonnet-4-20250514-v1:0',
'gateway/bedrock:eu.anthropic.claude-sonnet-4-5-20250929-v1:0',
'gateway/bedrock:meta.llama3-1-405b-instruct-v1:0',
'gateway/bedrock:meta.llama3-1-70b-instruct-v1:0',
'gateway/bedrock:meta.llama3-1-8b-instruct-v1:0',
'gateway/bedrock:meta.llama3-70b-instruct-v1:0',
'gateway/bedrock:meta.llama3-8b-instruct-v1:0',
'gateway/bedrock:mistral.mistral-7b-instruct-v0:2',
'gateway/bedrock:mistral.mistral-large-2402-v1:0',
'gateway/bedrock:mistral.mistral-large-2407-v1:0',
'gateway/bedrock:mistral.mixtral-8x7b-instruct-v0:1',
'gateway/bedrock:us.amazon.nova-lite-v1:0',
'gateway/bedrock:us.amazon.nova-micro-v1:0',
'gateway/bedrock:us.amazon.nova-pro-v1:0',
'gateway/bedrock:us.anthropic.claude-3-5-haiku-20241022-v1:0',
'gateway/bedrock:us.anthropic.claude-3-5-sonnet-20240620-v1:0',
'gateway/bedrock:us.anthropic.claude-3-5-sonnet-20241022-v2:0',
'gateway/bedrock:us.anthropic.claude-3-7-sonnet-20250219-v1:0',
'gateway/bedrock:us.anthropic.claude-3-haiku-20240307-v1:0',
'gateway/bedrock:us.anthropic.claude-3-opus-20240229-v1:0',
'gateway/bedrock:us.anthropic.claude-3-sonnet-20240229-v1:0',
'gateway/bedrock:us.anthropic.claude-haiku-4-5-20251001-v1:0',
'gateway/bedrock:us.anthropic.claude-opus-4-20250514-v1:0',
'gateway/bedrock:us.anthropic.claude-sonnet-4-20250514-v1:0',
'gateway/bedrock:us.anthropic.claude-sonnet-4-5-20250929-v1:0',
'gateway/bedrock:us.meta.llama3-1-70b-instruct-v1:0',
'gateway/bedrock:us.meta.llama3-1-8b-instruct-v1:0',
'gateway/bedrock:us.meta.llama3-2-11b-instruct-v1:0',
'gateway/bedrock:us.meta.llama3-2-1b-instruct-v1:0',
'gateway/bedrock:us.meta.llama3-2-3b-instruct-v1:0',
'gateway/bedrock:us.meta.llama3-2-90b-instruct-v1:0',
'gateway/bedrock:us.meta.llama3-3-70b-instruct-v1:0',
'gateway/google-vertex:gemini-2.0-flash',
'gateway/google-vertex:gemini-2.0-flash-lite',
'gateway/google-vertex:gemini-2.5-flash',
'gateway/google-vertex:gemini-2.5-flash-image',
'gateway/google-vertex:gemini-2.5-flash-lite',
'gateway/google-vertex:gemini-2.5-flash-lite-preview-09-2025',
'gateway/google-vertex:gemini-2.5-flash-preview-09-2025',
'gateway/google-vertex:gemini-2.5-pro',
'gateway/google-vertex:gemini-3-pro-preview',
'gateway/google-vertex:gemini-flash-latest',
'gateway/google-vertex:gemini-flash-lite-latest',
'gateway/groq:deepseek-r1-distill-llama-70b',
'gateway/groq:deepseek-r1-distill-qwen-32b',
'gateway/groq:distil-whisper-large-v3-en',
'gateway/groq:gemma2-9b-it',
'gateway/groq:llama-3.1-8b-instant',
'gateway/groq:llama-3.2-11b-vision-preview',
'gateway/groq:llama-3.2-1b-preview',
'gateway/groq:llama-3.2-3b-preview',
'gateway/groq:llama-3.2-90b-vision-preview',
'gateway/groq:llama-3.3-70b-specdec',
'gateway/groq:llama-3.3-70b-versatile',
'gateway/groq:llama-guard-3-8b',
'gateway/groq:llama3-70b-8192',
'gateway/groq:llama3-8b-8192',
'gateway/groq:mistral-saba-24b',
'gateway/groq:moonshotai/kimi-k2-instruct',
'gateway/groq:playai-tts',
'gateway/groq:playai-tts-arabic',
'gateway/groq:qwen-2.5-32b',
'gateway/groq:qwen-2.5-coder-32b',
'gateway/groq:qwen-qwq-32b',
'gateway/groq:whisper-large-v3',
'gateway/groq:whisper-large-v3-turbo',
'gateway/openai:chatgpt-4o-latest',
'gateway/openai:codex-mini-latest',
'gateway/openai:computer-use-preview',
'gateway/openai:computer-use-preview-2025-03-11',
'gateway/openai:gpt-3.5-turbo',
'gateway/openai:gpt-3.5-turbo-0125',
'gateway/openai:gpt-3.5-turbo-0301',
'gateway/openai:gpt-3.5-turbo-0613',
'gateway/openai:gpt-3.5-turbo-1106',
'gateway/openai:gpt-3.5-turbo-16k',
'gateway/openai:gpt-3.5-turbo-16k-0613',
'gateway/openai:gpt-4',
'gateway/openai:gpt-4-0125-preview',
'gateway/openai:gpt-4-0314',
'gateway/openai:gpt-4-0613',
'gateway/openai:gpt-4-1106-preview',
'gateway/openai:gpt-4-32k',
'gateway/openai:gpt-4-32k-0314',
'gateway/openai:gpt-4-32k-0613',
'gateway/openai:gpt-4-turbo',
'gateway/openai:gpt-4-turbo-2024-04-09',
'gateway/openai:gpt-4-turbo-preview',
'gateway/openai:gpt-4-vision-preview',
'gateway/openai:gpt-4.1',
'gateway/openai:gpt-4.1-2025-04-14',
'gateway/openai:gpt-4.1-mini',
'gateway/openai:gpt-4.1-mini-2025-04-14',
'gateway/openai:gpt-4.1-nano',
'gateway/openai:gpt-4.1-nano-2025-04-14',
'gateway/openai:gpt-4o',
'gateway/openai:gpt-4o-2024-05-13',
'gateway/openai:gpt-4o-2024-08-06',
'gateway/openai:gpt-4o-2024-11-20',
'gateway/openai:gpt-4o-audio-preview',
'gateway/openai:gpt-4o-audio-preview-2024-10-01',
'gateway/openai:gpt-4o-audio-preview-2024-12-17',
'gateway/openai:gpt-4o-audio-preview-2025-06-03',
'gateway/openai:gpt-4o-mini',
'gateway/openai:gpt-4o-mini-2024-07-18',
'gateway/openai:gpt-4o-mini-audio-preview',
'gateway/openai:gpt-4o-mini-audio-preview-2024-12-17',
'gateway/openai:gpt-4o-mini-search-preview',
'gateway/openai:gpt-4o-mini-search-preview-2025-03-11',
'gateway/openai:gpt-4o-search-preview',
'gateway/openai:gpt-4o-search-preview-2025-03-11',
'gateway/openai:gpt-5',
'gateway/openai:gpt-5-2025-08-07',
'gateway/openai:gpt-5-chat-latest',
'gateway/openai:gpt-5-codex',
'gateway/openai:gpt-5-mini',
'gateway/openai:gpt-5-mini-2025-08-07',
'gateway/openai:gpt-5-nano',
'gateway/openai:gpt-5-nano-2025-08-07',
'gateway/openai:gpt-5-pro',
'gateway/openai:gpt-5-pro-2025-10-06',
'gateway/openai:gpt-5.1',
'gateway/openai:gpt-5.1-2025-11-13',
'gateway/openai:gpt-5.1-chat-latest',
'gateway/openai:gpt-5.1-codex',
'gateway/openai:gpt-5.1-mini',
'gateway/openai:o1',
'gateway/openai:o1-2024-12-17',
'gateway/openai:o1-mini',
'gateway/openai:o1-mini-2024-09-12',
'gateway/openai:o1-preview',
'gateway/openai:o1-preview-2024-09-12',
'gateway/openai:o1-pro',
'gateway/openai:o1-pro-2025-03-19',
'gateway/openai:o3',
'gateway/openai:o3-2025-04-16',
'gateway/openai:o3-deep-research',
'gateway/openai:o3-deep-research-2025-06-26',
'gateway/openai:o3-mini',
'gateway/openai:o3-mini-2025-01-31',
'gateway/openai:o3-pro',
'gateway/openai:o3-pro-2025-06-10',
'gateway/openai:o4-mini',
'gateway/openai:o4-mini-2025-04-16',
'gateway/openai:o4-mini-deep-research',
'gateway/openai:o4-mini-deep-research-2025-06-26',
'google-gla:gemini-flash-latest',
'google-gla:gemini-flash-lite-latest',
'google-gla:gemini-2.0-flash',
Expand Down
8 changes: 8 additions & 0 deletions tests/models/test_model_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ def get_model_names(model_name_type: Any) -> Iterator[str]:
openai_names = [f'openai:{n}' for n in get_model_names(OpenAIModelName)]
bedrock_names = [f'bedrock:{n}' for n in get_model_names(BedrockModelName)]
deepseek_names = ['deepseek:deepseek-chat', 'deepseek:deepseek-reasoner']
gateway_names = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we use the pydantic_ai.providers.gateway.UpstreamProvider type (possibly needs splitting up into 2 so that we don't include the APi types here), and then use those names as keys into a dict of things like {'openai': OpenAIModelName}? That way when we update it in the gateway file, this list will update too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will check it out

[f'gateway/anthropic:{n}' for n in get_model_names(AnthropicModelName)]
+ [f'gateway/bedrock:{n}' for n in get_model_names(BedrockModelName)]
+ [f'gateway/google-vertex:{n}' for n in get_model_names(GoogleModelName)]
+ [f'gateway/groq:{n}' for n in get_model_names(GroqModelName)]
+ [f'gateway/openai:{n}' for n in get_model_names(OpenAIModelName)]
)
huggingface_names = [f'huggingface:{n}' for n in get_model_names(HuggingFaceModelName)]
heroku_names = get_heroku_model_names()
cerebras_names = get_cerebras_model_names()
Expand All @@ -86,6 +93,7 @@ def get_model_names(model_name_type: Any) -> Iterator[str]:
+ openai_names
+ bedrock_names
+ deepseek_names
+ gateway_names
+ huggingface_names
+ heroku_names
+ cerebras_names
Expand Down
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def test_list_models(capfd: CaptureFixture[str]):
'mistral',
'cohere',
'deepseek',
'gateway/',
'heroku',
'moonshotai',
'grok',
Expand Down
Loading