-
Notifications
You must be signed in to change notification settings - Fork 134
fix: add reasoning content in request and response for gcp anthropic #1607
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?
Conversation
Signed-off-by: yxia216 <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1607 +/- ##
==========================================
+ Coverage 83.26% 83.30% +0.04%
==========================================
Files 137 137
Lines 12059 12138 +79
==========================================
+ Hits 10041 10112 +71
- Misses 1411 1419 +8
Partials 607 607 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: yxia216 <[email protected]>
a0e8f9d to
e09547c
Compare
|
/retest |
|
/retest |
| // The signature for a thinking block. | ||
| Signature *string `json:"signature,omitempty"` | ||
| RedactedContent []byte `json:"redactedContent,omitempty"` | ||
| Signature *string `json:"signature,omitempty"` |
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.
Extra spaces ?
| 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 { |
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.
Why do we need to decode in gateway ?
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.