Add available_providers to model_list.json#407
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This allows callers to specify which providers a model is available on. If empty, then we fallback to the existing behavior. Related to braintrustdata/braintrust-proxy#407
2314bbf to
81d7d3b
Compare
73b5963 to
6f5ca02
Compare
81d7d3b to
8ec80cf
Compare
6f5ca02 to
ff13a9a
Compare
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
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
ff13a9a to
d95e060
Compare
d95e060 to
8268252
Compare
8268252 to
fa0ba59
Compare
fa0ba59 to
1633ab8
Compare
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
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
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
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1633ab8b65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
| for (const p of ["gemini", "xai", "groq", "together_ai", "cerebras", "mistral", "perplexity", "databricks"]) { | ||
| if (provider === p && modelName.startsWith(p + "/")) { | ||
| return modelName.substring(p.length + 1); |
There was a problem hiding this comment.
Preserve Gemini Gemma remapping before generic prefix strip
Adding "gemini" to the generic prefix-stripping loop makes translateToBraintrust return early for every gemini/* name, so the Gemma-specific remap below never executes. In practice, inputs like provider="gemini" with modelName="gemini/gemma-2-9b-it" now map to gemma-2-9b-it instead of google/gemma-2-9b-it, which is the key format already present in model_list.json; this causes find-missing/update flows to miss existing models and can generate duplicate or stale entries.
Useful? React with 👍 / 👎.
| @@ -9,7 +9,11 @@ | |||
| "displayName": "GPT-5 mini", | |||
| "reasoning": true, | |||
| "max_input_tokens": 272000, | |||
| "max_output_tokens": 128000 | |||
| "max_output_tokens": 128000, | |||
| "available_providers": [ | |||
There was a problem hiding this comment.
I wonder if this would deprecate this:
https://github.com/braintrustdata/braintrust-proxy/blob/main/packages/proxy/schema/index.ts#L223
There was a problem hiding this comment.
Yeah, I was thinking that would happen naturally as we migrate from proxy to gateway
Olmo Maldonado (ibolmo)
left a comment
There was a problem hiding this comment.
i would double check if there's any side effects to adding this field, but this looks reasonable
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
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
1633ab8 to
230f784
Compare
Without this, it's impossible to tell which models are served by which providers, especially programmatically.
230f784 to
9c4928c
Compare
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
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
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

Without this, it's impossible to tell which models are served by which
providers, especially programmatically.