feat: configurable tool pricing, Sub2API channel, and alpha search billing
Add admin-configurable tool-call prices with cross-provider surcharge settlement, Sub2API channel support, /v1/alpha/search relay, and usage-log surcharge UI.
This commit is contained in:
@@ -37,5 +37,6 @@ const (
|
||||
APITypeReplicate
|
||||
APITypeCodex
|
||||
APITypeAdvancedCustom
|
||||
APITypeSub2API
|
||||
APITypeDummy // this one is only for count, do not add any channel after this
|
||||
)
|
||||
|
||||
@@ -56,6 +56,7 @@ const (
|
||||
ChannelTypeReplicate = 56
|
||||
ChannelTypeCodex = 57
|
||||
ChannelTypeAdvancedCustom = 58
|
||||
ChannelTypeSub2API = 59
|
||||
ChannelTypeDummy // this one is only for count, do not add any channel after this
|
||||
|
||||
)
|
||||
@@ -120,6 +121,7 @@ var ChannelBaseURLs = []string{
|
||||
"https://api.replicate.com", //56
|
||||
"https://chatgpt.com", //57
|
||||
"", //58
|
||||
"", //59
|
||||
}
|
||||
|
||||
var ChannelTypeNames = map[int]string{
|
||||
@@ -178,6 +180,7 @@ var ChannelTypeNames = map[int]string{
|
||||
ChannelTypeReplicate: "Replicate",
|
||||
ChannelTypeCodex: "ChatGPT Subscription (Codex)",
|
||||
ChannelTypeAdvancedCustom: "Advanced Custom",
|
||||
ChannelTypeSub2API: "Sub2API",
|
||||
}
|
||||
|
||||
func GetChannelTypeName(channelType int) string {
|
||||
|
||||
@@ -6,6 +6,7 @@ const (
|
||||
EndpointTypeOpenAI EndpointType = "openai"
|
||||
EndpointTypeOpenAIResponse EndpointType = "openai-response"
|
||||
EndpointTypeOpenAIResponseCompact EndpointType = "openai-response-compact"
|
||||
EndpointTypeOpenAIAlphaSearch EndpointType = "openai-alpha-search"
|
||||
EndpointTypeAnthropic EndpointType = "anthropic"
|
||||
EndpointTypeGemini EndpointType = "gemini"
|
||||
EndpointTypeJinaRerank EndpointType = "jina-rerank"
|
||||
|
||||
Reference in New Issue
Block a user