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
6add81d4
authored
May 28, 2025
by
IcedTangerine
Committed by
GitHub
May 28, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1111 from feitianbubu/fxm-ali-fetch-models-url
fix: ali FetchUpstreamModels url
parents
7c34c010
bee6c661
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
controller/channel.go
+4
-1
No files found.
controller/channel.go
View file @
6add81d4
...
...
@@ -119,8 +119,11 @@ func FetchUpstreamModels(c *gin.Context) {
baseURL
=
channel
.
GetBaseURL
()
}
url
:=
fmt
.
Sprintf
(
"%s/v1/models"
,
baseURL
)
if
channel
.
Type
==
common
.
ChannelTypeGemini
{
switch
channel
.
Type
{
case
common
.
ChannelTypeGemini
:
url
=
fmt
.
Sprintf
(
"%s/v1beta/openai/models"
,
baseURL
)
case
common
.
ChannelTypeAli
:
url
=
fmt
.
Sprintf
(
"%s/compatible-mode/v1/models"
,
baseURL
)
}
body
,
err
:=
GetResponseBody
(
"GET"
,
url
,
channel
,
GetAuthHeader
(
channel
.
Key
))
if
err
!=
nil
{
...
...
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