feat: openai response /v1/response/compact (#2644)
* feat: openai response /v1/response/compact * feat: /v1/response/compact bill * feat: /v1/response/compact * feat: /v1/responses/compact -> codex channel * feat: /v1/responses/compact -> codex channel * feat: /v1/responses/compact -> codex channel * feat: codex channel default models * feat: compact model price * feat: /v1/responses/comapct test
This commit is contained in:
@@ -1,9 +1,25 @@
|
||||
package codex
|
||||
|
||||
var ModelList = []string{
|
||||
import (
|
||||
"github.com/QuantumNous/new-api/setting/ratio_setting"
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
|
||||
var baseModelList = []string{
|
||||
"gpt-5", "gpt-5-codex", "gpt-5-codex-mini",
|
||||
"gpt-5.1", "gpt-5.1-codex", "gpt-5.1-codex-max", "gpt-5.1-codex-mini",
|
||||
"gpt-5.2", "gpt-5.2-codex",
|
||||
}
|
||||
|
||||
var ModelList = withCompactModelSuffix(baseModelList)
|
||||
|
||||
const ChannelName = "codex"
|
||||
|
||||
func withCompactModelSuffix(models []string) []string {
|
||||
out := make([]string, 0, len(models)*2)
|
||||
out = append(out, models...)
|
||||
out = append(out, lo.Map(models, func(model string, _ int) string {
|
||||
return ratio_setting.WithCompactModelSuffix(model)
|
||||
})...)
|
||||
return lo.Uniq(out)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user