Repository navigation
Commit e7428e4
fix(session): prevent silent failure when small_model is invalid
When small_model is configured to an invalid model ID, ensureTitle()
throws ProviderModelNotFoundError. This was an unhandled rejection
because the call site didn't await or catch errors.
Two changes:
1. Wrap ensureTitle() call with void + .catch() so errors are logged
instead of becoming unhandled rejections.
2. In getSmallModel(), catch ModelNotFoundError when small_model config
is invalid, log a warning, and fall back to heuristic model selection
rather than throwing.
Fixes anomalyco#14807
Co-Authored-By: Claude <[email protected]>1 parent ae19003 commit e7428e4
2 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
1218 | 1229 | | |
1219 | 1230 | | |
1220 | 1231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| |||
0 commit comments