Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
061fd48d
Unverified
Commit
061fd48d
authored
Apr 19, 2026
by
Wesley Liddick
Committed by
GitHub
Apr 19, 2026
Browse files
Merge pull request #1749 from touwaeriol/fix/xhigh-reasoning-effort
fix: support xhigh reasoning effort in usage records
parents
51af8df3
6530776a
Changes
3
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/gateway_request.go
View file @
061fd48d
...
...
@@ -962,7 +962,7 @@ func NormalizeClaudeOutputEffort(raw string) *string {
return
nil
}
switch
value
{
case
"low"
,
"medium"
,
"high"
,
"max"
:
case
"low"
,
"medium"
,
"high"
,
"xhigh"
,
"max"
:
return
&
value
default
:
return
nil
...
...
backend/internal/service/gateway_request_test.go
View file @
061fd48d
...
...
@@ -1149,6 +1149,11 @@ func TestParseGatewayRequest_OutputEffort(t *testing.T) {
body
:
`{"model":"claude-opus-4-6","output_config":{"effort":"max"},"messages":[]}`
,
wantEffort
:
"max"
,
},
{
name
:
"output_config.effort xhigh"
,
body
:
`{"model":"claude-opus-4-7","output_config":{"effort":"xhigh"},"messages":[]}`
,
wantEffort
:
"xhigh"
,
},
{
name
:
"output_config without effort"
,
body
:
`{"model":"claude-opus-4-6","output_config":{},"messages":[]}`
,
...
...
@@ -1186,9 +1191,10 @@ func TestNormalizeClaudeOutputEffort(t *testing.T) {
{
"LOW"
,
strPtr
(
"low"
)},
{
"Max"
,
strPtr
(
"max"
)},
{
" medium "
,
strPtr
(
"medium"
)},
{
"xhigh"
,
strPtr
(
"xhigh"
)},
{
"XHIGH"
,
strPtr
(
"xhigh"
)},
{
""
,
nil
},
{
"unknown"
,
nil
},
{
"xhigh"
,
nil
},
}
for
_
,
tt
:=
range
tests
{
t
.
Run
(
tt
.
input
,
func
(
t
*
testing
.
T
)
{
...
...
frontend/src/utils/format.ts
View file @
061fd48d
...
...
@@ -193,7 +193,9 @@ export function formatReasoningEffort(effort: string | null | undefined): string
return
'
High
'
case
'
xhigh
'
:
case
'
extrahigh
'
:
return
'
Xhigh
'
return
'
XHigh
'
case
'
max
'
:
return
'
Max
'
case
'
none
'
:
case
'
minimal
'
:
return
'
-
'
...
...
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