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
f8a69ec8
authored
Nov 14, 2025
by
Seefs
Committed by
GitHub
Nov 14, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2226 from QuantumNous/omit-anthropic_beta-empty
fix(relay/channel/aws): 修复AnthropicBeta字段的omitempty处理
parents
59a74909
11426aa8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
relay/channel/aws/dto.go
+4
-1
No files found.
relay/channel/aws/dto.go
View file @
f8a69ec8
...
@@ -12,7 +12,7 @@ import (
...
@@ -12,7 +12,7 @@ import (
type
AwsClaudeRequest
struct
{
type
AwsClaudeRequest
struct
{
// AnthropicVersion should be "bedrock-2023-05-31"
// AnthropicVersion should be "bedrock-2023-05-31"
AnthropicVersion
string
`json:"anthropic_version"`
AnthropicVersion
string
`json:"anthropic_version"`
AnthropicBeta
json
.
RawMessage
`json:"anthropic_beta"`
AnthropicBeta
json
.
RawMessage
`json:"anthropic_beta
,omitempty
"`
System
any
`json:"system,omitempty"`
System
any
`json:"system,omitempty"`
Messages
[]
dto
.
ClaudeMessage
`json:"messages"`
Messages
[]
dto
.
ClaudeMessage
`json:"messages"`
MaxTokens
uint
`json:"max_tokens,omitempty"`
MaxTokens
uint
`json:"max_tokens,omitempty"`
...
@@ -40,8 +40,11 @@ func formatRequest(requestBody io.Reader, requestHeader http.Header) (*AwsClaude
...
@@ -40,8 +40,11 @@ func formatRequest(requestBody io.Reader, requestHeader http.Header) (*AwsClaude
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
var
tempArray
[]
string
if
err
:=
json
.
Unmarshal
(
betaJson
,
&
tempArray
);
err
==
nil
&&
len
(
tempArray
)
!=
0
&&
len
(
betaJson
)
>
0
{
awsClaudeRequest
.
AnthropicBeta
=
json
.
RawMessage
(
betaJson
)
awsClaudeRequest
.
AnthropicBeta
=
json
.
RawMessage
(
betaJson
)
}
}
}
return
&
awsClaudeRequest
,
nil
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