Skip to content

Commit 1ac1d72

Browse files
committed
binary quant
1 parent 450fc52 commit 1ac1d72

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "roo-code",
33
"packageManager": "[email protected]",
44
"engines": {
5-
"node": "20.19.2"
5+
"node": "22.17.0"
66
},
77
"scripts": {
88
"preinstall": "node scripts/bootstrap.mjs",

src/services/code-index/constants/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CODEBASE_INDEX_DEFAULTS } from "@roo-code/types"
44
export const MAX_BLOCK_CHARS = 1000
55
export const MIN_BLOCK_CHARS = 50
66
export const MIN_CHUNK_REMAINDER_CHARS = 200 // Minimum characters for the *next* chunk after a split
7-
export const MAX_CHARS_TOLERANCE_FACTOR = 1.05 // 15% tolerance for max chars
7+
export const MAX_CHARS_TOLERANCE_FACTOR = 1.08 // 8% 15 tolerance for max chars
88
/**Search */
99
export const DEFAULT_SEARCH_MIN_SCORE = CODEBASE_INDEX_DEFAULTS.DEFAULT_SEARCH_MIN_SCORE
1010
export const DEFAULT_MAX_SEARCH_RESULTS = CODEBASE_INDEX_DEFAULTS.DEFAULT_SEARCH_RESULTS
@@ -15,15 +15,15 @@ export const MAX_FILE_SIZE_BYTES = 1 * 1024 * 1024 // 1MB
1515

1616
/**Directory Scanner */
1717
export const MAX_LIST_FILES_LIMIT_CODE_INDEX = 10_000
18-
export const BATCH_SEGMENT_THRESHOLD = 10 // 60 Number of code segments to batch for embeddings/upserts
19-
export const MAX_BATCH_RETRIES = 3
20-
export const INITIAL_RETRY_DELAY_MS = 500
18+
export const BATCH_SEGMENT_THRESHOLD = 8 // 60 Number of code segments to batch for embeddings/upserts
19+
export const MAX_BATCH_RETRIES = 5
20+
export const INITIAL_RETRY_DELAY_MS = 600
2121
export const PARSING_CONCURRENCY = 10
2222
export const MAX_PENDING_BATCHES = 20 // Maximum number of batches to accumulate before waiting
2323

2424
/**OpenAI Embedder */
2525
export const MAX_BATCH_TOKENS = 100000
26-
export const MAX_ITEM_TOKENS = 1536
26+
export const MAX_ITEM_TOKENS = 2048
2727
export const BATCH_PROCESSING_CONCURRENCY = 10
2828

2929
/**Gemini Embedder */

src/services/code-index/vector-store/qdrant-client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ export class QdrantVectorStore implements IVectorStore {
156156
size: this.vectorSize,
157157
distance: this.DISTANCE_METRIC,
158158
},
159+
// TODO binary
160+
quantization_config: {
161+
binary: {
162+
encoding: "two_bits",
163+
always_ram: false,
164+
},
165+
},
159166
})
160167
created = true
161168
} else {

0 commit comments

Comments
 (0)