Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11426aa8
authored
Nov 14, 2025
by
creamlike1024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(relay/channel/aws): 修复AnthropicBeta字段的omitempty处理
parent
59a74909
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
relay/channel/aws/dto.go
+5
-2
No files found.
relay/channel/aws/dto.go
View file @
11426aa8
...
...
@@ -12,7 +12,7 @@ import (
type
AwsClaudeRequest
struct
{
// AnthropicVersion should be "bedrock-2023-05-31"
AnthropicVersion
string
`json:"anthropic_version"`
AnthropicBeta
json
.
RawMessage
`json:"anthropic_beta"`
AnthropicBeta
json
.
RawMessage
`json:"anthropic_beta
,omitempty
"`
System
any
`json:"system,omitempty"`
Messages
[]
dto
.
ClaudeMessage
`json:"messages"`
MaxTokens
uint
`json:"max_tokens,omitempty"`
...
...
@@ -40,7 +40,10 @@ func formatRequest(requestBody io.Reader, requestHeader http.Header) (*AwsClaude
if
err
!=
nil
{
return
nil
,
err
}
awsClaudeRequest
.
AnthropicBeta
=
json
.
RawMessage
(
betaJson
)
var
tempArray
[]
string
if
err
:=
json
.
Unmarshal
(
betaJson
,
&
tempArray
);
err
==
nil
&&
len
(
tempArray
)
!=
0
&&
len
(
betaJson
)
>
0
{
awsClaudeRequest
.
AnthropicBeta
=
json
.
RawMessage
(
betaJson
)
}
}
return
&
awsClaudeRequest
,
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment