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
3fe4fd4c
Commit
3fe4fd4c
authored
Apr 23, 2026
by
shaw
Browse files
chore: add model gpt-5.5
parent
827a4498
Changes
5
Show whitespace changes
Inline
Side-by-side
backend/internal/service/billing_service.go
View file @
3fe4fd4c
...
@@ -217,6 +217,9 @@ func (s *BillingService) initFallbackPricing() {
...
@@ -217,6 +217,9 @@ func (s *BillingService) initFallbackPricing() {
LongContextInputMultiplier
:
openAIGPT54LongContextInputMultiplier
,
LongContextInputMultiplier
:
openAIGPT54LongContextInputMultiplier
,
LongContextOutputMultiplier
:
openAIGPT54LongContextOutputMultiplier
,
LongContextOutputMultiplier
:
openAIGPT54LongContextOutputMultiplier
,
}
}
// GPT-5.5 暂无独立定价,回退到 GPT-5.4
s
.
fallbackPrices
[
"gpt-5.5"
]
=
s
.
fallbackPrices
[
"gpt-5.4"
]
s
.
fallbackPrices
[
"gpt-5.4-mini"
]
=
&
ModelPricing
{
s
.
fallbackPrices
[
"gpt-5.4-mini"
]
=
&
ModelPricing
{
InputPricePerToken
:
7.5e-7
,
InputPricePerToken
:
7.5e-7
,
OutputPricePerToken
:
4.5e-6
,
OutputPricePerToken
:
4.5e-6
,
...
@@ -288,6 +291,8 @@ func (s *BillingService) getFallbackPricing(model string) *ModelPricing {
...
@@ -288,6 +291,8 @@ func (s *BillingService) getFallbackPricing(model string) *ModelPricing {
if
strings
.
Contains
(
modelLower
,
"gpt-5"
)
||
strings
.
Contains
(
modelLower
,
"codex"
)
{
if
strings
.
Contains
(
modelLower
,
"gpt-5"
)
||
strings
.
Contains
(
modelLower
,
"codex"
)
{
normalized
:=
normalizeCodexModel
(
modelLower
)
normalized
:=
normalizeCodexModel
(
modelLower
)
switch
normalized
{
switch
normalized
{
case
"gpt-5.5"
:
return
s
.
fallbackPrices
[
"gpt-5.5"
]
case
"gpt-5.4-mini"
:
case
"gpt-5.4-mini"
:
return
s
.
fallbackPrices
[
"gpt-5.4-mini"
]
return
s
.
fallbackPrices
[
"gpt-5.4-mini"
]
case
"gpt-5.4"
:
case
"gpt-5.4"
:
...
@@ -637,7 +642,8 @@ func isOpenAIGPT54Model(model string) bool {
...
@@ -637,7 +642,8 @@ func isOpenAIGPT54Model(model string) bool {
if
!
strings
.
Contains
(
trimmed
,
"gpt-5"
)
&&
!
strings
.
Contains
(
trimmed
,
"codex"
)
{
if
!
strings
.
Contains
(
trimmed
,
"gpt-5"
)
&&
!
strings
.
Contains
(
trimmed
,
"codex"
)
{
return
false
return
false
}
}
return
normalizeCodexModel
(
trimmed
)
==
"gpt-5.4"
normalized
:=
normalizeCodexModel
(
trimmed
)
return
normalized
==
"gpt-5.4"
||
normalized
==
"gpt-5.5"
}
}
// CalculateCostWithConfig 使用配置中的默认倍率计算费用
// CalculateCostWithConfig 使用配置中的默认倍率计算费用
...
...
backend/internal/service/openai_codex_transform.go
View file @
3fe4fd4c
...
@@ -6,6 +6,7 @@ import (
...
@@ -6,6 +6,7 @@ import (
)
)
var
codexModelMap
=
map
[
string
]
string
{
var
codexModelMap
=
map
[
string
]
string
{
"gpt-5.5"
:
"gpt-5.5"
,
"gpt-5.4"
:
"gpt-5.4"
,
"gpt-5.4"
:
"gpt-5.4"
,
"gpt-5.4-mini"
:
"gpt-5.4-mini"
,
"gpt-5.4-mini"
:
"gpt-5.4-mini"
,
"gpt-5.4-none"
:
"gpt-5.4"
,
"gpt-5.4-none"
:
"gpt-5.4"
,
...
@@ -207,6 +208,9 @@ func normalizeCodexModel(model string) string {
...
@@ -207,6 +208,9 @@ func normalizeCodexModel(model string) string {
normalized
:=
strings
.
ToLower
(
modelID
)
normalized
:=
strings
.
ToLower
(
modelID
)
if
strings
.
Contains
(
normalized
,
"gpt-5.5"
)
||
strings
.
Contains
(
normalized
,
"gpt 5.5"
)
{
return
"gpt-5.5"
}
if
strings
.
Contains
(
normalized
,
"gpt-5.4-mini"
)
||
strings
.
Contains
(
normalized
,
"gpt 5.4 mini"
)
{
if
strings
.
Contains
(
normalized
,
"gpt-5.4-mini"
)
||
strings
.
Contains
(
normalized
,
"gpt 5.4 mini"
)
{
return
"gpt-5.4-mini"
return
"gpt-5.4-mini"
}
}
...
...
backend/internal/service/pricing_service.go
View file @
3fe4fd4c
...
@@ -794,6 +794,13 @@ func (s *PricingService) matchOpenAIModel(model string) *LiteLLMModelPricing {
...
@@ -794,6 +794,13 @@ func (s *PricingService) matchOpenAIModel(model string) *LiteLLMModelPricing {
}
}
}
}
// GPT-5.5 回退到 GPT-5.4 定价
if
strings
.
HasPrefix
(
model
,
"gpt-5.5"
)
{
logger
.
With
(
zap
.
String
(
"component"
,
"service.pricing"
))
.
Info
(
fmt
.
Sprintf
(
"[Pricing] OpenAI fallback matched %s -> %s"
,
model
,
"gpt-5.4(static)"
))
return
openAIGPT54FallbackPricing
}
if
strings
.
HasPrefix
(
model
,
"gpt-5.4-mini"
)
{
if
strings
.
HasPrefix
(
model
,
"gpt-5.4-mini"
)
{
logger
.
With
(
zap
.
String
(
"component"
,
"service.pricing"
))
.
logger
.
With
(
zap
.
String
(
"component"
,
"service.pricing"
))
.
Info
(
fmt
.
Sprintf
(
"[Pricing] OpenAI fallback matched %s -> %s"
,
model
,
"gpt-5.4-mini(static)"
))
Info
(
fmt
.
Sprintf
(
"[Pricing] OpenAI fallback matched %s -> %s"
,
model
,
"gpt-5.4-mini(static)"
))
...
...
frontend/src/components/keys/UseKeyModal.vue
View file @
3fe4fd4c
...
@@ -633,6 +633,22 @@ function generateOpenCodeConfig(platform: string, baseUrl: string, apiKey: strin
...
@@ -633,6 +633,22 @@ function generateOpenCodeConfig(platform: string, baseUrl: string, apiKey: strin
xhigh
:
{}
xhigh
:
{}
}
}
},
},
'
gpt-5.5
'
:
{
name
:
'
GPT-5.5
'
,
limit
:
{
context
:
1050000
,
output
:
128000
},
options
:
{
store
:
false
},
variants
:
{
low
:
{},
medium
:
{},
high
:
{},
xhigh
:
{}
}
},
'
gpt-5.4
'
:
{
'
gpt-5.4
'
:
{
name
:
'
GPT-5.4
'
,
name
:
'
GPT-5.4
'
,
limit
:
{
limit
:
{
...
...
frontend/src/composables/useModelWhitelist.ts
View file @
3fe4fd4c
...
@@ -16,6 +16,8 @@ const openaiModels = [
...
@@ -16,6 +16,8 @@ const openaiModels = [
// GPT-5.2 系列
// GPT-5.2 系列
'
gpt-5.2
'
,
'
gpt-5.2-2025-12-11
'
,
'
gpt-5.2-chat-latest
'
,
'
gpt-5.2
'
,
'
gpt-5.2-2025-12-11
'
,
'
gpt-5.2-chat-latest
'
,
'
gpt-5.2-pro
'
,
'
gpt-5.2-pro-2025-12-11
'
,
'
gpt-5.2-pro
'
,
'
gpt-5.2-pro-2025-12-11
'
,
// GPT-5.5 系列
'
gpt-5.5
'
,
// GPT-5.4 系列
// GPT-5.4 系列
'
gpt-5.4
'
,
'
gpt-5.4-mini
'
,
'
gpt-5.4-2026-03-05
'
,
'
gpt-5.4
'
,
'
gpt-5.4-mini
'
,
'
gpt-5.4-2026-03-05
'
,
// GPT-5.3 系列
// GPT-5.3 系列
...
@@ -260,6 +262,7 @@ const openaiPresetMappings = [
...
@@ -260,6 +262,7 @@ const openaiPresetMappings = [
{
label
:
'
o3
'
,
from
:
'
o3
'
,
to
:
'
o3
'
,
color
:
'
bg-emerald-100 text-emerald-700 hover:bg-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-400
'
},
{
label
:
'
o3
'
,
from
:
'
o3
'
,
to
:
'
o3
'
,
color
:
'
bg-emerald-100 text-emerald-700 hover:bg-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-400
'
},
{
label
:
'
GPT-5.3 Codex Spark
'
,
from
:
'
gpt-5.3-codex-spark
'
,
to
:
'
gpt-5.3-codex-spark
'
,
color
:
'
bg-teal-100 text-teal-700 hover:bg-teal-200 dark:bg-teal-900/30 dark:text-teal-400
'
},
{
label
:
'
GPT-5.3 Codex Spark
'
,
from
:
'
gpt-5.3-codex-spark
'
,
to
:
'
gpt-5.3-codex-spark
'
,
color
:
'
bg-teal-100 text-teal-700 hover:bg-teal-200 dark:bg-teal-900/30 dark:text-teal-400
'
},
{
label
:
'
GPT-5.2
'
,
from
:
'
gpt-5.2
'
,
to
:
'
gpt-5.2
'
,
color
:
'
bg-red-100 text-red-700 hover:bg-red-200 dark:bg-red-900/30 dark:text-red-400
'
},
{
label
:
'
GPT-5.2
'
,
from
:
'
gpt-5.2
'
,
to
:
'
gpt-5.2
'
,
color
:
'
bg-red-100 text-red-700 hover:bg-red-200 dark:bg-red-900/30 dark:text-red-400
'
},
{
label
:
'
GPT-5.5
'
,
from
:
'
gpt-5.5
'
,
to
:
'
gpt-5.5
'
,
color
:
'
bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400
'
},
{
label
:
'
GPT-5.4
'
,
from
:
'
gpt-5.4
'
,
to
:
'
gpt-5.4
'
,
color
:
'
bg-rose-100 text-rose-700 hover:bg-rose-200 dark:bg-rose-900/30 dark:text-rose-400
'
},
{
label
:
'
GPT-5.4
'
,
from
:
'
gpt-5.4
'
,
to
:
'
gpt-5.4
'
,
color
:
'
bg-rose-100 text-rose-700 hover:bg-rose-200 dark:bg-rose-900/30 dark:text-rose-400
'
},
{
label
:
'
Haiku→5.4
'
,
from
:
'
claude-haiku-4-5-20251001
'
,
to
:
'
gpt-5.4
'
,
color
:
'
bg-emerald-100 text-emerald-700 hover:bg-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-400
'
},
{
label
:
'
Haiku→5.4
'
,
from
:
'
claude-haiku-4-5-20251001
'
,
to
:
'
gpt-5.4
'
,
color
:
'
bg-emerald-100 text-emerald-700 hover:bg-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-400
'
},
{
label
:
'
Opus→5.4
'
,
from
:
'
claude-opus-4-6
'
,
to
:
'
gpt-5.4
'
,
color
:
'
bg-purple-100 text-purple-700 hover:bg-purple-200 dark:bg-purple-900/30 dark:text-purple-400
'
},
{
label
:
'
Opus→5.4
'
,
from
:
'
claude-opus-4-6
'
,
to
:
'
gpt-5.4
'
,
color
:
'
bg-purple-100 text-purple-700 hover:bg-purple-200 dark:bg-purple-900/30 dark:text-purple-400
'
},
...
...
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