Skip to content

fix: test using the correct path for rerank - #2736

Merged
Calcium-Ion merged 2 commits into
QuantumNous:mainfrom
seefs001:fix/reranker-test
Jan 26, 2026
Merged

fix: test using the correct path for rerank#2736
Calcium-Ion merged 2 commits into
QuantumNous:mainfrom
seefs001:fix/reranker-test

Conversation

@seefs001

@seefs001 seefs001 commented Jan 24, 2026

Copy link
Copy Markdown
Collaborator

fix #2734 #2521

Summary by CodeRabbit

Chores

  • Updated Jina Rerank endpoint path from /rerank to /v1/rerank across all platform components, including endpoint configurations, UI labels, model templates, and test utilities.

✏️ Tip: You can customize this high-level summary in your review settings.

…ommodate certain channels, such as Codex, which are incompatible with single strings.
@coderabbitai

coderabbitai Bot commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The changes update the default API endpoint path for Jina Rerank service from "/rerank" to "/v1/rerank" across backend configuration and frontend UI components. Test logic in the channel controller was enhanced to detect rerank models and generate appropriate test payloads with JSON message arrays.

Changes

Cohort / File(s) Summary
Backend Endpoint Configuration
common/endpoint_defaults.go
Updated default endpoint mapping for EndpointTypeJinaRerank from "/rerank" to "/v1/rerank".
Backend Test Logic
controller/channel-test.go
Enhanced auto-detection logic to identify rerank models by name and route them to /v1/rerank path. Updated OpenAI and Codex response test payloads to use JSON arrays for the Input field instead of plain strings.
Frontend UI Components
web/src/components/table/channels/modals/ModelTestModal.jsx, web/src/components/table/models/modals/EditModelModal.jsx, web/src/components/table/models/modals/EditPrefillGroupModal.jsx
Updated jina-rerank endpoint labels and templates from "/rerank" to "/v1/rerank" across three modal components.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The diff consists primarily of homogeneous, repetitive string updates (four single-line path changes) paired with straightforward test logic enhancements. Low cognitive complexity with consistent pattern application across multiple files.

Poem

🐰 The rerank path hops with grace,
From /rerank to /v1/rerank's place,
Through tests and configs, the changes align,
Five files now with a path so fine,
SiliconCloud models shall test with cheer! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: correcting the rerank endpoint path used in testing from /rerank to /v1/rerank.
Linked Issues check ✅ Passed The code changes directly address issue #2734 by updating the rerank endpoint path from /rerank to /v1/rerank across backend and frontend components, fixing the test failures reported.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the rerank endpoint path issue: backend endpoint defaults, test logic adjustments, and UI label updates are all within scope.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@Calcium-Ion
Calcium-Ion merged commit 7da04be into QuantumNous:main Jan 26, 2026
1 check passed
ennnnny pushed a commit to ennnnny/new-api that referenced this pull request Mar 17, 2026
* fix: test using the correct path for rerank.

* fix: The `input` parameter for testing responses uses an array to accommodate certain channels, such as Codex, which are incompatible with single strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

硅基流动rerank模型配置好渠道之后出现 错误: Model does not exist. Please check it carefully 但实际调用正常可用

2 participants