Stop the Zed cloud LLM provider from funneling completion failures through anyhow::Error and collapsing them into LanguageModelCompletionError::Other (which surfaced as a generic "Request failed."). - perform_llm_completion now returns a typed LanguageModelCompletionError, mapping each failure to its real variant (SerializeRequest, HttpSend, ApiReadResponseError, and ApiError-derived status variants). - response_lines yields a typed ResponseStreamError so mid-stream read/ deserialize failures become ApiReadResponseError/DeserializeResponse without a runtime downcast. - Add a first-class PaymentRequired variant for HTTP 402 and remove the now-dead PaymentRequiredError struct and its anyhow downcast checks. Self-Review Checklist: - [ ] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
7 files changedLine totals unavailable