Commit ebd74b8
fix(proxy): handle 404 with model-not-found guidance (#1748)
* fix(proxy): handle BYOK 404 with model-not-found guidance
After user BYOK error handling, return a helpful message when the
upstream provider responds with 404, indicating the model does not
exist or is no longer available. Recommends switching to
kilo-auto/balanced, with explicit /model instructions for
kiloclaw/openclaw users.
* fix: move 404 model-not-found handler outside BYOK block
The 404 handler should apply to all users, not just BYOK users.
* fix: recommend kilo-auto/free when user balance is zero
When the user has no credits, recommend kilo-auto/free instead of
kilo-auto/balanced in the 404 model-not-found message.
* fix: add BYOK-specific 404 message without auto model recommendation
BYOK users get a plain message pointing them to check the model name
and their API provider, while non-BYOK users still get the auto model
recommendation.
* fix: drop kilocode/ prefix from non-claw 404 recommendation
* fix: remove BYOK 404 entry from byokErrorMessages
* Format
---------
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: Christiaan Arnoldus <christiaan.arnoldus@outlook.com>1 parent e2e2d46 commit ebd74b8
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| 594 | + | |
| 595 | + | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| 152 | + | |
| 153 | + | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| |||
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
| |||
0 commit comments