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
395f06f4
authored
Sep 27, 2025
by
RedwindA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加对 Zhipu v4 渠道获取模型列表的支持
parent
ee6e5ff8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
controller/channel.go
+2
-0
No files found.
controller/channel.go
View file @
395f06f4
...
@@ -188,6 +188,8 @@ func FetchUpstreamModels(c *gin.Context) {
...
@@ -188,6 +188,8 @@ func FetchUpstreamModels(c *gin.Context) {
url
=
fmt
.
Sprintf
(
"%s/v1beta/openai/models"
,
baseURL
)
// Remove key in url since we need to use AuthHeader
url
=
fmt
.
Sprintf
(
"%s/v1beta/openai/models"
,
baseURL
)
// Remove key in url since we need to use AuthHeader
case
constant
.
ChannelTypeAli
:
case
constant
.
ChannelTypeAli
:
url
=
fmt
.
Sprintf
(
"%s/compatible-mode/v1/models"
,
baseURL
)
url
=
fmt
.
Sprintf
(
"%s/compatible-mode/v1/models"
,
baseURL
)
case
constant
.
ChannelTypeZhipu_v4
:
url
=
fmt
.
Sprintf
(
"%s/api/paas/v4/models"
,
baseURL
)
default
:
default
:
url
=
fmt
.
Sprintf
(
"%s/v1/models"
,
baseURL
)
url
=
fmt
.
Sprintf
(
"%s/v1/models"
,
baseURL
)
}
}
...
...
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