🔌 feat(api): extend endpoint type support & expose in pricing UI
* backend
- constant/endpoint_type.go
• Add EndpointTypeMidjourney, EndpointTypeSuno, EndpointTypeKling, EndpointTypeJimeng.
- common/endpoint_type.go
• Map Midjourney / MidjourneyPlus, SunoAPI, Kling, Jimeng channel types to the new endpoint types.
* frontend
- ModelPricing.js
• Add “Supported Endpoint Type” column.
• Implement renderSupportedEndpoints with `stringToColor` for consistent tag colors.
These changes allow `/api/pricing` and model lists to return accurate
`supported_endpoint_types` covering all non-OpenAI providers and display
them clearly in the UI.
No breaking changes.
This commit is contained in:
@@ -8,6 +8,14 @@ func GetEndpointTypesByChannelType(channelType int, modelName string) []constant
|
||||
switch channelType {
|
||||
case constant.ChannelTypeJina:
|
||||
endpointTypes = []constant.EndpointType{constant.EndpointTypeJinaRerank}
|
||||
case constant.ChannelTypeMidjourney, constant.ChannelTypeMidjourneyPlus:
|
||||
endpointTypes = []constant.EndpointType{constant.EndpointTypeMidjourney}
|
||||
case constant.ChannelTypeSunoAPI:
|
||||
endpointTypes = []constant.EndpointType{constant.EndpointTypeSuno}
|
||||
case constant.ChannelTypeKling:
|
||||
endpointTypes = []constant.EndpointType{constant.EndpointTypeKling}
|
||||
case constant.ChannelTypeJimeng:
|
||||
endpointTypes = []constant.EndpointType{constant.EndpointTypeJimeng}
|
||||
case constant.ChannelTypeAws:
|
||||
fallthrough
|
||||
case constant.ChannelTypeAnthropic:
|
||||
|
||||
Reference in New Issue
Block a user