mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-15 23:22:59 +08:00
fix(groups): merge main and resolve model allowlist conflicts
Resolve three conflicts from main's #6680 (supplementUnmappedOpenAIModels): 1. gateway_handler.go — keep PR's allowlist refactoring (ModelAllowlistEnabled, writeAllowlistedModelsList, modelListingSource); main's OpenAI branch in writeModelsList was auto-merged. 2. group_models_list.go (modify/delete) — delete file per PR intent; relocate supplementUnmappedOpenAIModels to group_model_allowlist.go where gateway_service and openai_codex_models_service can still call it. 3. openai_codex_models_service.go — combine main's supplementUnmappedOpenAIModels wrapping with PR's ModelAllowlistEnabled() guard. Also fix two auto-merged test files that still referenced the old GroupModelsListConfig / ModelsListConfig types.
This commit is contained in:
@@ -1303,6 +1303,10 @@ func (h *GatewayHandler) compositeAvailableModels(ctx context.Context, groupID *
|
||||
}
|
||||
|
||||
func writeModelsList(c *gin.Context, platform string, modelIDs []string) {
|
||||
if platform == service.PlatformOpenAI {
|
||||
writeOpenAIModelsList(c, modelIDs)
|
||||
return
|
||||
}
|
||||
if platform == service.PlatformGrok {
|
||||
writeGrokModelsList(c, modelIDs)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user