Commit db323a5
authored
refactor(config): move reasoning fields from Category to ModelScore (#414)
* refactor(config): move reasoning fields from Category to ModelScore
Move ReasoningDescription and ReasoningEffort from Category level to ModelScore level to enable model-specific reasoning configuration.
**What type of PR is this?**
[Refactoring / Breaking Change]
**What this PR does / why we need it**:
This PR refactors the reasoning configuration structure by moving and fields from the Category level to the ModelScore level. This change enables more granular control over reasoning behavior at the model level rather than the category level.
**Key Changes:**
- Remove and from struct
- These fields now exist in struct (model-level configuration)
- Update to accept parameter
- Update all configuration files to new format (9 files)
- Update Python training scripts to generate new format
- Update TypeScript dashboard to read from best model
- Update all test files
**Breaking Change:**
This is a breaking change with no backward compatibility. Old configuration files must be migrated to the new format.
**Migration:**
Old format:
```yaml
categories:
- name: math
reasoning_description: "..."
reasoning_effort: high
model_scores:
- model: model-a
use_reasoning: true
```
New format:
```yaml
categories:
- name: math
model_scores:
- model: model-a
use_reasoning: true
reasoning_description: "..."
reasoning_effort: high
```
**Testing:**
- All Go tests pass
- All configuration files validated
- TypeScript type checking passes
Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>
* fix(test): move ReasoningEffort to ModelScore in classification test
Update generic_category_mapping_test.go to use the new structure where
reasoning_effort is a field of ModelScore instead of Category.
Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>
---------
Signed-off-by: Xunzhuo <[email protected]>
Signed-off-by: bitliu <[email protected]>1 parent 4963c3d commit db323a5
File tree
9 files changed
+123
-143
lines changed- config
- dashboard/frontend/src/pages
- src
- semantic-router/pkg
- config
- extproc
- utils/classification
- training/model_eval
9 files changed
+123
-143
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 89 | | |
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
| 93 | + | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
| 106 | + | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | | - | |
117 | | - | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
| 118 | + | |
122 | 119 | | |
123 | 120 | | |
124 | 121 | | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
129 | | - | |
130 | | - | |
131 | 126 | | |
132 | 127 | | |
133 | 128 | | |
134 | 129 | | |
| 130 | + | |
135 | 131 | | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 138 | | |
146 | 139 | | |
147 | 140 | | |
148 | 141 | | |
| 142 | + | |
| 143 | + | |
149 | 144 | | |
150 | 145 | | |
151 | 146 | | |
152 | 147 | | |
153 | 148 | | |
154 | 149 | | |
155 | 150 | | |
156 | | - | |
157 | | - | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
| 155 | + | |
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
165 | 159 | | |
166 | 160 | | |
167 | 161 | | |
168 | 162 | | |
169 | | - | |
170 | | - | |
171 | 163 | | |
172 | 164 | | |
173 | 165 | | |
174 | 166 | | |
| 167 | + | |
175 | 168 | | |
176 | 169 | | |
177 | 170 | | |
178 | 171 | | |
179 | 172 | | |
180 | 173 | | |
181 | 174 | | |
182 | | - | |
183 | | - | |
184 | 175 | | |
185 | 176 | | |
186 | 177 | | |
187 | 178 | | |
| 179 | + | |
188 | 180 | | |
189 | 181 | | |
190 | 182 | | |
191 | 183 | | |
192 | 184 | | |
193 | 185 | | |
194 | 186 | | |
195 | | - | |
196 | | - | |
197 | 187 | | |
198 | 188 | | |
199 | 189 | | |
200 | 190 | | |
| 191 | + | |
201 | 192 | | |
202 | 193 | | |
203 | 194 | | |
204 | 195 | | |
205 | 196 | | |
206 | 197 | | |
207 | 198 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 199 | | |
212 | 200 | | |
213 | 201 | | |
214 | 202 | | |
| 203 | + | |
| 204 | + | |
215 | 205 | | |
216 | 206 | | |
217 | 207 | | |
| 208 | + | |
| 209 | + | |
218 | 210 | | |
219 | 211 | | |
220 | 212 | | |
221 | 213 | | |
222 | 214 | | |
223 | 215 | | |
224 | 216 | | |
225 | | - | |
226 | | - | |
227 | 217 | | |
228 | 218 | | |
229 | 219 | | |
230 | 220 | | |
| 221 | + | |
231 | 222 | | |
232 | 223 | | |
233 | 224 | | |
234 | 225 | | |
235 | 226 | | |
236 | 227 | | |
237 | 228 | | |
238 | | - | |
239 | | - | |
240 | 229 | | |
241 | 230 | | |
242 | 231 | | |
243 | 232 | | |
| 233 | + | |
244 | 234 | | |
245 | 235 | | |
246 | 236 | | |
247 | 237 | | |
248 | 238 | | |
249 | 239 | | |
250 | 240 | | |
251 | | - | |
252 | | - | |
253 | 241 | | |
254 | 242 | | |
255 | 243 | | |
256 | 244 | | |
| 245 | + | |
257 | 246 | | |
258 | 247 | | |
259 | 248 | | |
260 | 249 | | |
261 | 250 | | |
262 | 251 | | |
263 | 252 | | |
264 | | - | |
265 | | - | |
266 | 253 | | |
267 | 254 | | |
268 | 255 | | |
269 | 256 | | |
| 257 | + | |
270 | 258 | | |
271 | 259 | | |
272 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
1408 | 1407 | | |
1409 | 1408 | | |
1410 | 1409 | | |
1411 | | - | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1412 | 1418 | | |
1413 | 1419 | | |
1414 | 1420 | | |
1415 | 1421 | | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1419 | 1425 | | |
1420 | 1426 | | |
1421 | 1427 | | |
| |||
1424 | 1430 | | |
1425 | 1431 | | |
1426 | 1432 | | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
| 1433 | + | |
1431 | 1434 | | |
1432 | 1435 | | |
1433 | 1436 | | |
| |||
1436 | 1439 | | |
1437 | 1440 | | |
1438 | 1441 | | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | 1442 | | |
1460 | 1443 | | |
1461 | 1444 | | |
| |||
1484 | 1467 | | |
1485 | 1468 | | |
1486 | 1469 | | |
1487 | | - | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1488 | 1473 | | |
1489 | 1474 | | |
1490 | 1475 | | |
| |||
1635 | 1620 | | |
1636 | 1621 | | |
1637 | 1622 | | |
1638 | | - | |
| 1623 | + | |
1639 | 1624 | | |
1640 | 1625 | | |
1641 | 1626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
364 | 362 | | |
365 | 363 | | |
366 | 364 | | |
| |||
382 | 380 | | |
383 | 381 | | |
384 | 382 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | 383 | | |
398 | 384 | | |
399 | 385 | | |
| |||
0 commit comments