Commit cb45be4
1bcMax
feat: add model fallback on provider errors (v0.4.0)
- Add fallback chain execution when primary model fails with provider error
- Detect billing errors, rate limits, model unavailable, and server errors
- Try up to 3 models from tier's fallback chain before returning error
- Add skipBalanceCheck option for testing
- Add fallback.ts test suite (16 tests)
- Add getProxyPort() and checkExistingProxy() helpers1 parent 4534205 commit cb45be4
3 files changed
Lines changed: 552 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments