# language_models: Add OpenRouterError and map OpenRouter errors to LanguageModelCompletionError \(\#34227\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4368c1b56ba2c6f13957ca884459f00770a6fd01)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4368c1b56ba2c6f13957ca884459f00770a6fd01

Requested commit: 4368c1b56ba2c6f13957ca884459f00770a6fd01

Commit: 4368c1b56ba2c6f13957ca884459f00770a6fd01

Tree: 7bb12aac0b2a3d0f87e326446b4bae2fdc3e23d4

Author: Umesh Yadav

Committer: GitHub

## Message

```
language_models: Add OpenRouterError and map OpenRouter errors to LanguageModelCompletionError (#34227)

Improves the error handling for openrouter and adds automatic retry like
anthropic for few of the status codes.
Release Notes:

- Improves error messages for Openrouter provider
- Automatic retry when rate limited or Server error from Openrouter
```

## Parents

- [e5a968b709feeeac1e12de054645671d64071676](https://git.cafe/gitcafe/zed/commit/e5a968b709feeeac1e12de054645671d64071676?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4368c1b56ba2c6f13957ca884459f00770a6fd01?format=markdown)
