From 0480dee83f9e2ad123a6ebd28f0466d1cd946189 Mon Sep 17 00:00:00 2001 From: Haruko386 Date: Mon, 15 Jun 2026 15:26:35 +0800 Subject: [PATCH] fix: output 2 lines when list-supported models (#16015) ### What problem does this PR solve? ``` RAGFlow(api/default)> list supported models from 'longcat' 'test' +-----------+------------+---------------+------------+-------------+-----------------------------+----------+ | dimension | dimensions | max_dimension | max_tokens | model_types | name | thinking | +-----------+------------+---------------+------------+-------------+-----------------------------+----------+ | | | | | | LongCat-2.0-Preview@LongCat | | | | | | | | LongCat-2.0-Preview@LongCat | | +-----------+------------+---------------+------------+-------------+-----------------------------+----------+ # Fixed: RAGFlow(api/default)> list supported models from 'longcat' 'test' +------------+---------------+------------+-------------+-----------------------------+----------+ | dimensions | max_dimension | max_tokens | model_types | name | thinking | +------------+---------------+------------+-------------+-----------------------------+----------+ | | | | | LongCat-2.0-Preview@LongCat | | +------------+---------------+------------+-------------+-----------------------------+----------+ ``` ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- internal/service/model_service.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/service/model_service.go b/internal/service/model_service.go index 7b25213091..111bbaa05c 100644 --- a/internal/service/model_service.go +++ b/internal/service/model_service.go @@ -275,17 +275,6 @@ func (m *ModelProviderService) ListSupportedModels(providerName, instanceName, u "model_types": model.ModelTypes, "thinking": model.Thinking, }) - modelData := map[string]interface{}{ - "name": model.Name, - "dimension": model.MaxDimension, - "max_tokens": model.MaxTokens, - "model_types": model.ModelTypes, - "thinking": model.Thinking, - } - if len(model.Dimensions) > 0 { - modelData["dimensions"] = model.Dimensions - } - result = append(result, modelData) } return result, nil }