**What is added?** Additional error handling functionality is added before the errors are thrown to be handled by upstream handlers. The changes improves the user experience and make the error handling smoother (and more informative). **Why is it added?** Before this addition, when a user tried to use a model they needed previous setup for, the program crashed. This is not necessary here, and informative message is sufficient and enhances user experience. This adheres to the specifications stated in the code file as well by not masking potential logical error detection. Following is before and after:   Moreover, AFAIK no logic was present to handle this or a similar issue in upstream handlers. **How is it scoped? Why won't this mask other errors?** The new brach triggers *only* for `invalid_request_error` events whose `code` is model related (`model_not_found`) This also doesn't prevent the detection (for the case of masking logical errors) of wrong model names, as they would have been caught earlier on. The code passes test, lint and type checks. I believe relevant documentation is added, but I would be more than happy to do further fixes in the code if necessary. |
||
|---|---|---|
| .. | ||
| sandbox | ||
| agent-loop.ts | ||
| apply-patch.ts | ||
| exec.ts | ||
| handle-exec-command.ts | ||
| log.ts | ||
| parse-apply-patch.ts | ||
| review.ts | ||