diff --git a/core/providers/azure/models.go b/core/providers/azure/models.go index be89bd8ff..ed37d32f6 100644 --- a/core/providers/azure/models.go +++ b/core/providers/azure/models.go @@ -124,6 +124,7 @@ func (response *AzureListModelsResponse) ToBifrostListModelsResponse(allowedMode modelEntry.ID = string(schemas.Azure) + "/" + deploymentAlias modelEntry.Deployment = schemas.Ptr(deploymentValue) } + bifrostResponse.Data = append(bifrostResponse.Data, modelEntry) } return bifrostResponse diff --git a/core/providers/utils/utils.go b/core/providers/utils/utils.go index 64e2bf86e..d361f51cf 100644 --- a/core/providers/utils/utils.go +++ b/core/providers/utils/utils.go @@ -1117,9 +1117,7 @@ func aggregateListModelsResponses(responses []*schemas.BifrostListModelsResponse } } - if len(responses) == 1 { - return responses[0] - } + // Always apply deduplication, even for single responses // Use a map to track unique model IDs for efficient deduplication seenIDs := make(map[string]struct{})