Commit e1cd469
committed
fix(llm-router): add threshold validation and empty-tiers guard
- Validate threshold range (0, 2] in update_tier_threshold before
assignment, matching the ModelTier Pydantic schema constraint.
- Guard _get_tier_matches against empty tiers list to prevent
ValueError from max() on empty sequence.
Applied to both sync and async implementations.1 parent e5facb6 commit e1cd469
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
| 351 | + | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| |||
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
| 395 | + | |
| 396 | + | |
393 | 397 | | |
394 | 398 | | |
395 | 399 | | |
| |||
1086 | 1090 | | |
1087 | 1091 | | |
1088 | 1092 | | |
| 1093 | + | |
| 1094 | + | |
1089 | 1095 | | |
1090 | 1096 | | |
1091 | 1097 | | |
| |||
1129 | 1135 | | |
1130 | 1136 | | |
1131 | 1137 | | |
| 1138 | + | |
| 1139 | + | |
1132 | 1140 | | |
1133 | 1141 | | |
1134 | 1142 | | |
| |||
0 commit comments