🔌 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:
t0ng7u
2025-07-04 03:15:34 +08:00
parent 819290c9b8
commit bf577b8937
4 changed files with 44 additions and 3 deletions

View File

@@ -8,4 +8,8 @@ const (
EndpointTypeAnthropic EndpointType = "anthropic"
EndpointTypeGemini EndpointType = "gemini"
EndpointTypeJinaRerank EndpointType = "jina-rerank"
EndpointTypeMidjourney EndpointType = "midjourney-proxy"
EndpointTypeSuno EndpointType = "suno-proxy"
EndpointTypeKling EndpointType = "kling"
EndpointTypeJimeng EndpointType = "jimeng"
)