Commit 14538a1
refactor(knowledge): centralize tokenizer mapping on EmbeddingModelInfo
Add tokenizerProvider directly to EmbeddingModelInfo so callers read it
from the registry instead of reimplementing the gemini→google / openai→openai
map at each call site. Removes the local helper in chunks/service.ts and
the inline ternary in search/route.ts.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 96cf4dd commit 14538a1
3 files changed
Lines changed: 13 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
410 | 409 | | |
411 | 410 | | |
412 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 18 | | |
28 | 19 | | |
29 | 20 | | |
| |||
136 | 127 | | |
137 | 128 | | |
138 | 129 | | |
139 | | - | |
140 | 130 | | |
141 | 131 | | |
142 | | - | |
| 132 | + | |
143 | 133 | | |
144 | 134 | | |
145 | 135 | | |
| |||
398 | 388 | | |
399 | 389 | | |
400 | 390 | | |
401 | | - | |
402 | 391 | | |
403 | 392 | | |
404 | | - | |
| 393 | + | |
405 | 394 | | |
406 | 395 | | |
407 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments