Fix vertex endpoint for newer models and responses schema #147
Merged
Ken Jiang (knjiang) merged 4 commits intomainfrom Mar 19, 2026
Merged
Fix vertex endpoint for newer models and responses schema #147Ken Jiang (knjiang) merged 4 commits intomainfrom
Ken Jiang (knjiang) merged 4 commits intomainfrom
Conversation
| map.insert("tool_choice".into(), Value::String("none".into())); | ||
| map.insert("tools".into(), Value::Array(vec![])); | ||
| map.insert("parallel_tool_calls".into(), Value::Bool(false)); | ||
| map.insert("incomplete_details".into(), Value::Null); |
Contributor
Author
There was a problem hiding this comment.
drive-by fix to allow AI SDK
Comment on lines
+114
to
+128
| fn resolve_location(&self, spec: &ModelSpec, default_location: &str) -> String { | ||
| // Precedence: model spec locations > secret metadata location > default. | ||
| if let Ok(extra) = ::serde_json::from_value::<VertexModelExtra>( | ||
| ::serde_json::Value::Object(spec.extra.clone()), | ||
| ) { | ||
| if !extra.locations.is_empty() { | ||
| let idx = rand::thread_rng().gen_range(0..extra.locations.len()); | ||
| return extra.locations[idx].clone(); | ||
| } | ||
| } | ||
| if !self.config.location.is_empty() { | ||
| return self.config.location.clone(); | ||
| } | ||
| default_location.to_string() | ||
| } |
Contributor
Author
There was a problem hiding this comment.
this matches the proxy code where we randomly choose location from the locations array for people who specify custom models with a variety of lcoations -> https://github.com/braintrustdata/braintrust-proxy/blob/main/packages/proxy/src/proxy.ts#L2451
Matt Perpick (clutchski)
approved these changes
Mar 19, 2026
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.
No description provided.