feat: add service_tier support for GCP Vertex Gemini provider#7471
Open
gopalvarun03 wants to merge 1 commit into
Open
feat: add service_tier support for GCP Vertex Gemini provider#7471gopalvarun03 wants to merge 1 commit into
gopalvarun03 wants to merge 1 commit into
Conversation
Map service_tier inference parameter to Vertex AI HTTP headers:
- auto: no headers (Vertex default)
- default: X-Vertex-AI-LLM-Request-Type: shared
- priority: X-Vertex-AI-LLM-Request-Type: shared +
X-Vertex-AI-LLM-Shared-Request-Type: priority
- flex: X-Vertex-AI-LLM-Request-Type: shared +
X-Vertex-AI-LLM-Shared-Request-Type: flex
Changes:
- Add get_service_tier_headers() helper function
- Inject headers in infer() and infer_stream()
- Remove unsupported warning from apply_inference_params()
- Warn when service_tier is used with batch inference
- Add unit tests for get_service_tier_headers()
- Update apply_inference_params test to assert no false warning
|
Thank you for your contribution! Before we can accept this pull request, we need every commit author to sign the TensorZero Contributor License Agreement. Pending signatures: If that's you, please post a comment on this pull request with the following text:
If anything looks off, comment |
Author
|
I have read the Contributor License Agreement (CLA) and hereby sign the CLA. |
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.
Map service_tier inference parameter to Vertex AI HTTP headers:
Changes: