Skip to content

Add support for available_providers in model spec#136

Merged
aswink merged 1 commit intomainfrom
aswin/03-03-add_support_for_available_providers_in_model_spec
Mar 14, 2026
Merged

Add support for available_providers in model spec#136
aswink merged 1 commit intomainfrom
aswin/03-03-add_support_for_available_providers_in_model_spec

Conversation

@aswink
Copy link
Contributor

@aswink aswink commented Mar 4, 2026

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

Copy link
Contributor Author

aswink commented Mar 4, 2026

@aswink aswink changed the base branch from main to graphite-base/136 March 4, 2026 20:07
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from 8f26156 to 7b894d0 Compare March 4, 2026 20:07
@aswink aswink changed the base branch from graphite-base/136 to aswin/02-26-remove_retries March 4, 2026 20:07
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from 7b894d0 to 6e0b232 Compare March 4, 2026 21:31
@aswink aswink closed this Mar 5, 2026
@aswink aswink deleted the aswin/03-03-add_support_for_available_providers_in_model_spec branch March 5, 2026 19:12
@aswink aswink restored the aswin/03-03-add_support_for_available_providers_in_model_spec branch March 5, 2026 19:35
@aswink aswink reopened this Mar 5, 2026
@aswink aswink changed the base branch from aswin/02-26-remove_retries to graphite-base/136 March 11, 2026 19:27
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from 6e0b232 to d9e354e Compare March 11, 2026 19:27
@aswink aswink changed the base branch from graphite-base/136 to main March 11, 2026 19:27
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch 2 times, most recently from 5680d78 to 67f8c8f Compare March 11, 2026 21:17
@aswink aswink marked this pull request as ready for review March 11, 2026 21:19
@aswink aswink changed the base branch from main to graphite-base/136 March 12, 2026 05:20
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from 67f8c8f to 7305528 Compare March 12, 2026 05:21
@aswink aswink changed the base branch from graphite-base/136 to aswin/03-11-avoid_duplicate_entries_in_router_builder March 12, 2026 05:21
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from 7305528 to fa732ce Compare March 12, 2026 05:43
@aswink aswink force-pushed the aswin/03-11-avoid_duplicate_entries_in_router_builder branch from 32118b8 to d1eec00 Compare March 12, 2026 05:43
Copy link
Contributor

@knjiang Ken Jiang (knjiang) left a comment

Choose a reason for hiding this comment

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

looks good no blockers

Comment on lines +54 to +55
} else if lingua::is_vertex_model(model) {
vec!["vertex".to_string()]
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, in that case yes? I'll leave that to a follow up just in case, though.

@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from fa732ce to 4ed88e1 Compare March 14, 2026 03:45
Copy link
Contributor Author

aswink commented Mar 14, 2026

Merge activity

  • Mar 14, 4:44 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 14, 4:45 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 14, 4:54 AM UTC: aswink merged this pull request with Graphite.

@aswink aswink changed the base branch from aswin/03-11-avoid_duplicate_entries_in_router_builder to graphite-base/136 March 14, 2026 04:44
@aswink aswink changed the base branch from graphite-base/136 to main March 14, 2026 04:44
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
@aswink aswink force-pushed the aswin/03-03-add_support_for_available_providers_in_model_spec branch from 4ed88e1 to 40eaf35 Compare March 14, 2026 04:45
@aswink aswink merged commit 68c9df8 into main Mar 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants