Skip to content

Conversation

@dmontagu
Copy link
Contributor

This makes it significantly easier to manually specify the route when using pydantic-ai with pydantic AI gateway.

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

Docs Preview

commit: 6dadb70
Preview URL: https://a693fcdd-pydantic-ai-previews.pydantic.workers.dev

"""
This regex matches strings of the forms:
1. gateway/my-upstream-provider
2. gateway:my-route/my-upstream-provider
Copy link
Collaborator

Choose a reason for hiding this comment

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

infer_provider is used in infer_model, which already uses : as a separator. So gateway:my-route/my-upstream-provider:my-model would be ambiguous. Some model providers even use : (and of course /) in their model name.

I don't think we should support something here that doesn't work as a provider shorthand for infer_model.

Would gateway/my-upstream-provider@my-route be crazy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants