fix: add reasoning content in request and response for gcp anthropic#1607
Merged
yuzisun merged 6 commits intoenvoyproxy:mainfrom Dec 15, 2025
Merged
fix: add reasoning content in request and response for gcp anthropic#1607yuzisun merged 6 commits intoenvoyproxy:mainfrom
yuzisun merged 6 commits intoenvoyproxy:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1607 +/- ##
==========================================
+ Coverage 83.40% 83.44% +0.04%
==========================================
Files 138 138
Lines 12455 12534 +79
==========================================
+ Hits 10388 10459 +71
- Misses 1434 1442 +8
Partials 633 633 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a0e8f9d to
e09547c
Compare
Contributor
Author
|
/retest |
Contributor
Author
|
/retest |
yuzisun
reviewed
Dec 5, 2025
yuzisun
reviewed
Dec 5, 2025
| var str string | ||
| if err := json.Unmarshal(data, &str); err == nil { | ||
| // Try to decode as base64 first (this would be []byte encoded as base64) | ||
| if decoded, err := base64.StdEncoding.DecodeString(str); err == nil { |
Contributor
There was a problem hiding this comment.
Why do we need to decode in gateway ?
Contributor
Author
There was a problem hiding this comment.
This is to check whether it's []byte, because in awsbedrock, the type is []byte but in gcp anthropic, the type is string
yuzisun
approved these changes
Dec 14, 2025
Contributor
yuzisun
left a comment
There was a problem hiding this comment.
@hustxiayang can you help update the documentation for the ReasoningContent for both AWS and GCP ?
missBerg
pushed a commit
to missBerg/ai-gateway
that referenced
this pull request
Dec 20, 2025
…nvoyproxy#1607) **Description** This PR is to fix the following issues: 1 Add reasoning content in the request is also missing in the gcp anthropic 2 The reasoning output of gcp anthropic is not parsed out In this way, reasoning claude models can have an unified interface. Other issues: 1 The assistant message of gcp anthropic did not cover the case of array. Fixed. --------- Signed-off-by: yxia216 <yxia216@bloomberg.net> Signed-off-by: Erica Hughberg <erica.sundberg.90@gmail.com>
hustxiayang
added a commit
to hustxiayang/ai-gateway
that referenced
this pull request
Jan 29, 2026
…nvoyproxy#1607) **Description** This PR is to fix the following issues: 1 Add reasoning content in the request is also missing in the gcp anthropic 2 The reasoning output of gcp anthropic is not parsed out In this way, reasoning claude models can have an unified interface. Other issues: 1 The assistant message of gcp anthropic did not cover the case of array. Fixed. --------- Signed-off-by: yxia216 <yxia216@bloomberg.net>
hustxiayang
added a commit
to hustxiayang/ai-gateway
that referenced
this pull request
Feb 2, 2026
…nvoyproxy#1607) **Description** This PR is to fix the following issues: 1 Add reasoning content in the request is also missing in the gcp anthropic 2 The reasoning output of gcp anthropic is not parsed out In this way, reasoning claude models can have an unified interface. Other issues: 1 The assistant message of gcp anthropic did not cover the case of array. Fixed. --------- Signed-off-by: yxia216 <yxia216@bloomberg.net>
hustxiayang
added a commit
to hustxiayang/ai-gateway
that referenced
this pull request
Feb 5, 2026
…nvoyproxy#1607) **Description** This PR is to fix the following issues: 1 Add reasoning content in the request is also missing in the gcp anthropic 2 The reasoning output of gcp anthropic is not parsed out In this way, reasoning claude models can have an unified interface. Other issues: 1 The assistant message of gcp anthropic did not cover the case of array. Fixed. --------- Signed-off-by: yxia216 <yxia216@bloomberg.net>
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.
Description
This PR is to fix the following issues:
1 Add reasoning content in the request is also missing in the gcp anthropic
2 The reasoning output of gcp anthropic is not parsed out
In this way, reasoning claude models can have an unified interface.
Other issues:
1 The assistant message of gcp anthropic did not cover the case of array. Fixed.