From 5e1d7ab3b921c7cc34fb1a8ffd2dfbe4b75512e1 Mon Sep 17 00:00:00 2001 From: CaIon Date: Mon, 13 Oct 2025 19:21:21 +0800 Subject: [PATCH] feat: add support for Sora channel type and OpenAI video endpoint --- common/endpoint_type.go | 2 ++ constant/endpoint_type.go | 1 + 2 files changed, 3 insertions(+) diff --git a/common/endpoint_type.go b/common/endpoint_type.go index bc120944..65e80ce2 100644 --- a/common/endpoint_type.go +++ b/common/endpoint_type.go @@ -26,6 +26,8 @@ func GetEndpointTypesByChannelType(channelType int, modelName string) []constant endpointTypes = []constant.EndpointType{constant.EndpointTypeGemini, constant.EndpointTypeOpenAI} case constant.ChannelTypeOpenRouter: // OpenRouter 只支持 OpenAI 端点 endpointTypes = []constant.EndpointType{constant.EndpointTypeOpenAI} + case constant.ChannelTypeSora: + endpointTypes = []constant.EndpointType{constant.EndpointTypeOpenAIVideo} default: if IsOpenAIResponseOnlyModel(modelName) { endpointTypes = []constant.EndpointType{constant.EndpointTypeOpenAIResponse} diff --git a/constant/endpoint_type.go b/constant/endpoint_type.go index f799e5ba..29c0d31e 100644 --- a/constant/endpoint_type.go +++ b/constant/endpoint_type.go @@ -10,6 +10,7 @@ const ( EndpointTypeJinaRerank EndpointType = "jina-rerank" EndpointTypeImageGeneration EndpointType = "image-generation" EndpointTypeEmbeddings EndpointType = "embeddings" + EndpointTypeOpenAIVideo EndpointType = "openai-video" //EndpointTypeMidjourney EndpointType = "midjourney-proxy" //EndpointTypeSuno EndpointType = "suno-proxy" //EndpointTypeKling EndpointType = "kling"