ZIm/crates/language_model/src
Michael Sloan d497f52e17
agent: Improve error handling and retry for zed-provided models (#33565)
* Updates to `zed_llm_client-0.8.5` which adds support for `retry_after`
when anthropic provides it.

* Distinguishes upstream provider errors and rate limits from errors
that originate from zed's servers

* Moves `LanguageModelCompletionError::BadInputJson` to
`LanguageModelCompletionEvent::ToolUseJsonParseError`. While arguably
this is an error case, the logic in thread is cleaner with this move.
There is also precedent for inclusion of errors in the event type -
`CompletionRequestStatus::Failed` is how cloud errors arrive.

* Updates `PROVIDER_ID` / `PROVIDER_NAME` constants to use proper types
instead of `&str`, since they can be constructed in a const fashion.

* Removes use of `CLIENT_SUPPORTS_EXA_WEB_SEARCH_PROVIDER_HEADER_NAME`
as the server no longer reads this header and just defaults to that
behavior.

Release notes for this is covered by #33275

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Richard <richard@zed.dev>
2025-06-30 21:01:32 -06:00
..
model language_model: Remove CloudModel enum (#31322) 2025-05-24 02:04:51 +00:00
fake_provider.rs Standardize on u64 for token counts (#32869) 2025-06-17 10:43:07 -04:00
language_model.rs agent: Improve error handling and retry for zed-provided models (#33565) 2025-06-30 21:01:32 -06:00
rate_limiter.rs More resilient eval (#32257) 2025-06-09 18:07:22 +00:00
registry.rs agent: Improve error handling and retry for zed-provided models (#33565) 2025-06-30 21:01:32 -06:00
request.rs agent: Fix issue with Anthropic thinking models (#33317) 2025-06-24 16:23:59 +00:00
role.rs language_model: Remove dependencies on individual model provider crates (#25503) 2025-02-24 16:41:35 -05:00
telemetry.rs agent: Improve error handling and retry for zed-provided models (#33565) 2025-06-30 21:01:32 -06:00