Skip to content

fix(components/retriever/qdrant): runnable WithRetrieverOption scoreThreshold inoperative - #1021

Open
JunGeiger wants to merge 2 commits into
cloudwego:mainfrom
JunGeiger:main
Open

JunGeiger wants to merge 2 commits into
cloudwego:mainfrom
JunGeiger:main

Conversation

@JunGeiger

Copy link
Copy Markdown

fix(components/retriever/qdrant): runnable WithRetrieverOption scoreThreshold inoperative

Bug: Dynamic ScoreThreshold from Option is ignored. Root cause: The code only reads r.scoreThreshold (set at creation time) and never reads co.ScoreThreshold (passed per-request via Option). When r.scoreThreshold is nil (no default configured), ScoreThreshold is never set on the request. When r.scoreThreshold is set, it silently overrides any dynamic value from Option.

Fix: Apply priority co.ScoreThreshold > r.scoreThreshold > nil, with single float64->float32 conversion at assignment.

What type of PR is this?
fix: runnable WithRetrieverOption scoreThreshold noperative

Which issue(s) this PR fixes:
Fixes (#1017)

…hreshold inoperative

Bug: Dynamic ScoreThreshold from Option is ignored.
Root cause: The code only reads r.scoreThreshold (set at creation time)
and never reads co.ScoreThreshold (passed per-request via Option).
When r.scoreThreshold is nil (no default configured), ScoreThreshold
is never set on the request. When r.scoreThreshold is set, it silently
overrides any dynamic value from Option.

Fix: Apply priority co.ScoreThreshold > r.scoreThreshold > nil,
with single float64->float32 conversion at assignment.
fix(components/retriever/qdrant): runnable WithRetrieverOption scoreT…
@CLAassistant

CLAassistant commented Sep 28, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants