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
5e1d7ab3
authored
Oct 13, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add support for Sora channel type and OpenAI video endpoint
parent
7c543a9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
common/endpoint_type.go
+2
-0
constant/endpoint_type.go
+1
-0
No files found.
common/endpoint_type.go
View file @
5e1d7ab3
...
@@ -26,6 +26,8 @@ func GetEndpointTypesByChannelType(channelType int, modelName string) []constant
...
@@ -26,6 +26,8 @@ func GetEndpointTypesByChannelType(channelType int, modelName string) []constant
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeGemini
,
constant
.
EndpointTypeOpenAI
}
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeGemini
,
constant
.
EndpointTypeOpenAI
}
case
constant
.
ChannelTypeOpenRouter
:
// OpenRouter 只支持 OpenAI 端点
case
constant
.
ChannelTypeOpenRouter
:
// OpenRouter 只支持 OpenAI 端点
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeOpenAI
}
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeOpenAI
}
case
constant
.
ChannelTypeSora
:
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeOpenAIVideo
}
default
:
default
:
if
IsOpenAIResponseOnlyModel
(
modelName
)
{
if
IsOpenAIResponseOnlyModel
(
modelName
)
{
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeOpenAIResponse
}
endpointTypes
=
[]
constant
.
EndpointType
{
constant
.
EndpointTypeOpenAIResponse
}
...
...
constant/endpoint_type.go
View file @
5e1d7ab3
...
@@ -10,6 +10,7 @@ const (
...
@@ -10,6 +10,7 @@ const (
EndpointTypeJinaRerank
EndpointType
=
"jina-rerank"
EndpointTypeJinaRerank
EndpointType
=
"jina-rerank"
EndpointTypeImageGeneration
EndpointType
=
"image-generation"
EndpointTypeImageGeneration
EndpointType
=
"image-generation"
EndpointTypeEmbeddings
EndpointType
=
"embeddings"
EndpointTypeEmbeddings
EndpointType
=
"embeddings"
EndpointTypeOpenAIVideo
EndpointType
=
"openai-video"
//EndpointTypeMidjourney EndpointType = "midjourney-proxy"
//EndpointTypeMidjourney EndpointType = "midjourney-proxy"
//EndpointTypeSuno EndpointType = "suno-proxy"
//EndpointTypeSuno EndpointType = "suno-proxy"
//EndpointTypeKling EndpointType = "kling"
//EndpointTypeKling EndpointType = "kling"
...
...
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