mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 04:22:58 +00:00
feat: gemini-2.5-flash-image-preview 文本和图片输出计费
This commit is contained in:
@@ -304,7 +304,7 @@ func CountRequestToken(c *gin.Context, meta *types.TokenCountMeta, info *relayco
|
||||
for _, file := range meta.Files {
|
||||
switch file.FileType {
|
||||
case types.FileTypeImage:
|
||||
if info.RelayFormat == types.RelayFormatGemini {
|
||||
if info.RelayFormat == types.RelayFormatGemini && !strings.HasPrefix(model, "gemini-2.5-flash-image-preview") {
|
||||
tkm += 256
|
||||
} else {
|
||||
token, err := getImageToken(file, model, info.IsStream)
|
||||
|
||||
Reference in New Issue
Block a user