-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add gateway to Known Model Names #3593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add gateway to Known Model Names #3593
Conversation
|
there's a flaky outlines test breaking CI :( |
| 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 = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize you couldn't see this comment in a private Slack channel, but I responded to Samuel (and he agreed):
Agreed, but if we add just a few per provider, people are definitely gonna ask us “but why not this other one?”, so maybe just include them all?
So we should NOT hard-code this, but dynamically build this based on the known model names of the providers that are known to work with gateway/{provider}
…/dsfaccini/pydantic-ai into add-gateway-to-known-model-names
tests/models/test_model_names.py
Outdated
| 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 = ( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will check it out
No description provided.