# Fix Zed upgrade prompts for non-Zed payment errors \(\#64094\) · gitcafe/zed

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

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

Visibility: public

Requested revision: fffb52c6dd27947493b27acadb7414080d5e137e

Requested commit: fffb52c6dd27947493b27acadb7414080d5e137e

Commit: fffb52c6dd27947493b27acadb7414080d5e137e

Tree: a3012d10248ae888384dafadd60c1d634ddade6f

Author: Conrad Irwin

Committer: GitHub

## Message

```
Fix Zed upgrade prompts for non-Zed payment errors (#64094)

## Summary

Fixes #63401.

Only payment errors originating from the Zed provider now use the Zed
free-usage-limit callout. Other providers use the existing Request
Failed display with their original message and no Zed upgrade button.
Telemetry follows the same distinction.

Rename the UI error variant to `ZedPaymentRequired` to make its scope
explicit. Add regression coverage for OpenRouter, OpenAI, and Anthropic
errors both with and without an HTTP status, plus the Zed upgrade path.

## Verification

- `cargo test -p agent_ui --lib conversation_view::tests`: 104 passed,
including both new regression tests.
- Rustfmt checks and `git diff --check` passed.
- Provided a temporary OpenCode payment-error override for manual
testing; the override has been removed and is not included in this PR.
- Corgi failed to link `clang_rt.osx`; the Cargo fallback succeeded.
Details were recorded in the requested local Corgi log.

Release Notes:

- Fixed payment errors from non-Zed model providers incorrectly
prompting users to upgrade to Zed Pro instead of displaying the original
provider error message.
```

## Parents

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

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