Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8c5c944f
authored
Nov 30, 2025
by
Calcium-Ion
Committed by
GitHub
Nov 30, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2339 from QuantumNous/revert-2330-pr/fix-nano-banana-err
Revert "fix: nano-banana not compatible imageSize"
parents
d33e4c8d
4c828741
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
7 deletions
+0
-7
relay/channel/gemini/adaptor.go
+0
-7
No files found.
relay/channel/gemini/adaptor.go
View file @
8c5c944f
...
...
@@ -6,7 +6,6 @@ import (
"fmt"
"io"
"net/http"
"slices"
"strings"
"github.com/QuantumNous/new-api/dto"
...
...
@@ -140,12 +139,6 @@ func (a *Adaptor) ConvertImageRequest(c *gin.Context, info *relaycommon.RelayInf
}
config
:=
processSizeParameters
(
strings
.
TrimSpace
(
request
.
Size
),
request
.
Quality
)
// 兼容 nano-banana 传quality[imageSize]会报错 An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
if
slices
.
Contains
([]
string
{
"nano-banana"
,
"gemini-2.5-flash-image"
},
info
.
UpstreamModelName
)
{
config
.
ImageSize
=
""
}
googleGenerationConfig
:=
map
[
string
]
interface
{}{
"response_modalities"
:
[]
string
{
"TEXT"
,
"IMAGE"
},
"image_config"
:
config
,
...
...
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