Files
llmx/codex-cli
Mehmet Vecdi Gönül 4e7403e5ea bugfix: additional error handling logic for model errors that occur in stream (#203)
**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:


![first](https://github.com/user-attachments/assets/0ce7c57d-8159-4cf7-8a53-3062cfd04dc8)

![second](https://github.com/user-attachments/assets/a9f24410-d76d-43d4-a0e2-ec513026843d)

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.
2025-04-17 08:09:27 -07:00
..
2025-04-17 07:18:43 -07:00
2025-04-16 12:56:08 -04:00
2025-04-16 12:56:08 -04:00
2025-04-17 07:18:43 -07:00
2025-04-16 12:56:08 -04:00
2025-04-17 07:18:43 -07:00
2025-04-16 12:56:08 -04:00
2025-04-17 07:18:43 -07:00
2025-04-17 07:18:43 -07:00
2025-04-16 12:56:08 -04:00