feat: add new features(thinking_level and media_resolution) of gemini3#1554
feat: add new features(thinking_level and media_resolution) of gemini3#1554yuzisun merged 7 commits intoenvoyproxy:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1554 +/- ##
==========================================
+ Coverage 84.18% 84.22% +0.04%
==========================================
Files 150 150
Lines 13005 13041 +36
==========================================
+ Hits 10948 10984 +36
Misses 1436 1436
Partials 621 621 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
internal/apischema/openai/openai.go
Outdated
| ThinkingConfig *genai.ThinkingConfig `json:"thinkingConfig,omitzero"` | ||
|
|
||
| // Detail is media resolution in gemini models | ||
| Detail genai.MediaResolution `json:"detail,omitempty"` |
There was a problem hiding this comment.
can you add the reference link?
There was a problem hiding this comment.
added, thanks for the comment
There was a problem hiding this comment.
Actually this filed should be added to the image part details
There was a problem hiding this comment.
the link is wrong, it points to the caching API
There was a problem hiding this comment.
this filed should be added to the image part details is already in openai' spec
There was a problem hiding this comment.
it points to the caching API I think the definition is the same
|
/retest |
1 similar comment
|
/retest |
internal/apischema/openai/openai.go
Outdated
| ThinkingConfig *genai.ThinkingConfig `json:"thinkingConfig,omitzero"` | ||
|
|
||
| // Detail here is to set global media resolution in gemini models: https://ai.google.dev/api/caching#MediaResolution | ||
| Detail genai.MediaResolution `json:"detail,omitempty"` |
There was a problem hiding this comment.
details can be confusing without context at the top level, since it is in the GCP vendor field section we should keep the name medium_resolution.
**Description** update anthropic -> translation code to correctly translate token usage --------- Signed-off-by: Alexa Griffith <agriffith50@bloomberg.net> Signed-off-by: yxia216 <yxia216@bloomberg.net>
Signed-off-by: yxia216 <yxia216@bloomberg.net>
…#1536) **Description** The SSE event spec supports 3 different delimiters (pair of CRLF / LF / CR). This PR updates the stream processing translator for GCP VertexAI to support all 3 delimiters. [SSE docs] about delimiters > **Note:** The docs define an event as `event = *( comment / field ) end-of-line` `end-of-line` is defined as a single CRLF or LF or CR (not a pair) But the `comment` and `field` definitions also end in `end-of-line` implying that an event always ends in a pair of CRLR / CR / LF [SSE docs]: https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream --------- Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net> Co-authored-by: Ignasi Barrera <ignasi@tetrate.io> Signed-off-by: yxia216 <yxia216@bloomberg.net>
Signed-off-by: yxia216 <yxia216@bloomberg.net>
Signed-off-by: yxia216 <yxia216@bloomberg.net>
da170d9 to
a47506d
Compare
envoyproxy#1554) **Description** Some new features were introduced in gemini3: **1 thinking_level:** https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#thinking_level This is similar to reasoning_effort of openai, thus, unified them. **2 media_resolution** https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#media_resolution This is similar to detail in openai, thus, unified them. The difference is that openai does not provide a global config of media_resolution. Thus, added it as gcp specific, but still use detail to make the name consistent. **Some related PRs:** thinking_budget is in envoyproxy#1461 thinking_level and thinking_budget are both supported, but can not use them together. Other features under review: **1 web search:** envoyproxy#1526 **2 parse the thought summary:** envoyproxy#1521 --------- Signed-off-by: yxia216 <yxia216@bloomberg.net> Signed-off-by: Alexa Griffith <agriffith50@bloomberg.net> Signed-off-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net> Co-authored-by: Alexa Griffith <agriffith50@bloomberg.net> Co-authored-by: Sukumar Gaonkar <sgaonkar4@bloomberg.net> Co-authored-by: Ignasi Barrera <ignasi@tetrate.io> Signed-off-by: Erica Hughberg <erica.sundberg.90@gmail.com>
Description
Some new features were introduced in gemini3:
1 thinking_level:
https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#thinking_level
This is similar to reasoning_effort of openai, thus, unified them.
2 media_resolution
https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#media_resolution
This is similar to detail in openai, thus, unified them.
The difference is that openai does not provide a global config of media_resolution. Thus, added it as gcp specific, but still use detail to make the name consistent.
Some related PRs:
thinking_budget is in
#1461
thinking_level and thinking_budget are both supported, but can not use them together.
Other features under review:
1 web search:
#1526
2 parse the thought summary:
#1521