fix: respect user-configured dimensions setting in file index #5755
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5754
Problem
RooCode was ignoring the dimensions setting in the file index configuration. When users configured the system to use 1536 dimensions, it would still try to use 1024 dimensions, causing a vector dimension error in Qdrant: "Vector dimension error: expected dim: 1536, got 1024".
Root Cause
The issue was in
src/core/webview/ClineProvider.ts
at line 1545, where there was a hardcoded fallback value of 1536 for the dimension setting:This hardcoded fallback was overriding the proper dimension resolution logic in the service factory.
Solution
Removed the hardcoded
?? 1536
fallback to allow the proper dimension resolution hierarchy to work:modelDimension
from config)getModelDimension()
from embedding model profiles)Changes
Testing
Technical Details
The system has a sophisticated dimension handling mechanism:
The fix ensures that user-configured dimensions are properly respected by allowing the dimension resolution to follow the proper hierarchy instead of being overridden by a hardcoded value.
Important
Removed hardcoded dimension fallback in
ClineProvider.ts
to respect user-configured settings.ClineProvider.ts
to respect user-configured dimensions.This description was created by
for 609638b. You can customize this summary. It will automatically update as commits are pushed.