Add support for available_providers in model spec#136
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8f26156 to
7b894d0
Compare
7b894d0 to
6e0b232
Compare
6e0b232 to
d9e354e
Compare
5680d78 to
67f8c8f
Compare
67f8c8f to
7305528
Compare
7305528 to
fa732ce
Compare
32118b8 to
d1eec00
Compare
Ken Jiang (knjiang)
approved these changes
Mar 13, 2026
Contributor
Ken Jiang (knjiang)
left a comment
There was a problem hiding this comment.
looks good no blockers
Comment on lines
+54
to
+55
| } else if lingua::is_vertex_model(model) { | ||
| vec!["vertex".to_string()] |
Contributor
There was a problem hiding this comment.
i had to do this because the current model_list.json doesn't tell u that its provider -> https://github.com/braintrustdata/braintrust-proxy/blob/main/packages/proxy/schema/model_list.json#L4022
i wonder if we can simplify now that we have available providers?
this could be a follow-up i tackle to get more familiar with the code.
Contributor
Author
There was a problem hiding this comment.
Oh, in that case yes? I'll leave that to a follow up just in case, though.
fa732ce to
4ed88e1
Compare
Contributor
Author
For now, the router behavior is the same as it was before, but this opens things up for callers to choose providers when multiple are available for a single model. Related to braintrustdata/braintrust-proxy#407
4ed88e1 to
40eaf35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Without this, we can only guess which providers can run a model. For
example, it's obvious that a vertex format model would run on GCP
Vertex, but what about a model like llama3? It could run on any provider.
This change adds explicit mappings from model ID -> supported providers.
This allows callers to specify which providers a model is available on. If
empty, then we fallback to the existing behavior. Also update
provider_aliases so it follows the same logic as resolve_providers,
particularly that it returns providers in the same order.
Depends on braintrustdata/braintrust-proxy#407