Skip to content

fix: output 2 lines when list-supported models - #16015

Merged
JinHai-CN merged 1 commit into
infiniflow:mainfrom
Haruko386:moon
Jun 15, 2026
Merged

JinHai-CN merged 1 commit into
infiniflow:mainfrom
Haruko386:moon

Conversation

@Haruko386

Copy link
Copy Markdown
Member

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

  • Bug Fix (non-breaking change which fixes an issue)

@Haruko386 Haruko386 added 🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration labels Jun 15, 2026
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 81328ad5-4c24-499a-88a7-9b3302a27202

📥 Commits

Reviewing files that changed from the base of the PR and between bc963f8 and 21c76df.

📒 Files selected for processing (1)
  • internal/service/model_service.go
💤 Files with no reviewable changes (1)
  • internal/service/model_service.go

📝 Walkthrough

Walkthrough

In ListSupportedModels, the per-model response map is restructured: the max-dimension key is renamed from dimension to max_dimension, and dimensions is now always included in the map rather than only when non-empty. Other fields (name, max_tokens, model_types, thinking) remain present.

Changes

Model Response Map Reshape

Layer / File(s) Summary
ListSupportedModels response map field rename
internal/service/model_service.go
Renames dimension → max_dimension in the returned map and unconditionally emits the dimensions field, removing the prior conditional inclusion.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A field once called dimension has changed its name today,
Now max_dimension proudly hops along the way,
And dimensions always shows, no longer hides in doubt,
The rabbit fixed the map keys — that's what it's all about!
🐇✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Linked issue #39 'set port' is unrelated to the current PR about fixing model listing output and lacks clear objectives or context. Either link a relevant issue that describes the model output bug fix requirements, or remove the unrelated issue link.
Title check ❓ Inconclusive The title mentions 'output 2 lines' and 'list-supported models', but the actual changes involve fixing field names and structure, not specifically about outputting 2 lines. Clarify the title to better reflect the actual fix: removing 'dimension' field and restructuring the response, rather than focusing on line count.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description includes the problem statement with before/after examples and correctly identifies the change as a bug fix, matching the template requirements.
Out of Scope Changes check ✅ Passed The changes focus on fixing the ListSupportedModels response structure by renaming and restructuring fields, which aligns with the stated objective of fixing the model listing output.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Haruko386
Haruko386 marked this pull request as draft June 15, 2026 06:19
@Haruko386
Haruko386 marked this pull request as ready for review June 15, 2026 06:19
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (400dfd5) to head (21c76df).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16015   +/-   ##
=======================================
  Coverage   93.16%   93.16%           
=======================================
  Files          10       10           
  Lines         717      717           
  Branches      118      118           
=======================================
  Hits          668      668           
  Misses         29       29           
  Partials       20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JinHai-CN
JinHai-CN merged commit 0480dee into infiniflow:main Jun 15, 2026
1 check passed
@Haruko386
Haruko386 deleted the moon branch June 16, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants