Repository navigation
feat: support for GCP Context Cache #2784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c056b87
b3c075b
25a0fe8
af29ee4
a5c9315
cb2e4d3
2cebce3
b33c7ab
932bb4c
f884272
fee4887
121d40b
bf2d1a4
34fd948
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2069,6 +2069,15 @@ type GCPVertexAIVendorFields struct { | |
| // | ||
| // https://cloud.google.com/vertex-ai/docs/reference/rest/v1/SafetySetting | ||
| SafetySettings []*genai.SafetySetting `json:"safetySettings,omitzero"` | ||
|
|
||
| // CachedContent specifies a pre-existing Vertex AI cached content resource to use as context. | ||
| // Format: "projects/{project}/locations/{location}/cachedContents/{cache_id}" | ||
| // | ||
| // When provided, cache_control markers on messages must be absent. The cache reference is | ||
| // sent directly to Gemini without calling any cache resolution logic. | ||
| // | ||
| // https://cloud.google.com/vertex-ai/docs/context-cache/context-cache-overview | ||
| CachedContent string `json:"cachedContent,omitzero"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. user does not have to set this field, it is set by the translator to the request sent to GCP |
||
| } | ||
|
|
||
| // GCPVertexAIGenerationConfig represents Gemini generation configuration options. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be the configuration on the extproc instead as it is more model specific.