## Problem
Provider HTTP 403 responses were categorized as generic API failures or
rewritten as authentication 401 errors. Users received misleading
diagnostics for credential or model-access denials, as reported in
#1242.
## Changes
| Before | After |
| --- | --- |
| Typed and generic OpenAI 403 errors fell through to generic API
failures. | Typed and generic OpenAI 403 errors become canonical
permission failures. |
| Raw HTTP 403 errors were rewritten as authentication failures with
status 401. | Raw HTTP 403 errors retain permission semantics and status
403. |
| Permission diagnostics used generic provider-failure wording. |
Permission diagnostics advise checking credential permissions and model
access while retaining redacted upstream detail. |
| Access-denial wire behavior was implicit. | Messages and Responses
return `permission_error` with `x-should-retry: false`. |
| The package version was 4.12.2. | The package version is 4.12.3. |
<!-- greptile_comment -->
<details open>…
Recover Claude sessions from provider context overflow (#1215)
## Problem
NVIDIA NIM can report context exhaustion as a 400 `BadRequestError`
saying its derived `max_tokens` is negative. FCC treated that as a
generic invalid request, so Claude Code could not recognize the smaller
upstream context window, compact the conversation, and replay the
interrupted turn. LM Studio also encoded Claude's recovery phrase inside
provider code instead of reporting a protocol-neutral failure. Fixes
#1198.
## Changes
- Add one protocol-neutral `context_window_exceeded` execution failure
with a non-retryable 400 contract.
- Narrowly classify only NVIDIA NIM's negative derived-`max_tokens`
signature while preserving the complete redacted provider diagnostic and
request ID.
- Let the Anthropic serializer alone add Claude's `prompt is too long`
compaction trigger; OpenAI Responses keeps a standard invalid-request
envelope.
- Migrate LM Studio's existing context preflight to the same neutral
semantic and document the ownership boundary.
- Add provider, protocol, API,…
Canonicalize provider failure and retry ownership (#1046)
## Problem
Provider SDK classification, retry policy, canonical failures, and
downstream wire errors shared exception types across layers. That
blurred ownership and let cleanup or provisional Responses tool failures
mask the real provider diagnostic.
## Changes
| Before | After |
| --- | --- |
| Provider failures carried Anthropic wire types and core code
classified OpenAI/httpx errors. | Protocol-neutral `ExecutionFailure`
values cross layers, providers classify SDK errors, and protocol
packages map wire types. |
| Provider adapters could author terminal wire events. | The HTTP commit
boundary selects non-2xx JSON or a protocol terminal event with one
ingress request ID. |
| Retry policy and diagnostic handling were spread across core and
provider modules. | Providers own the unchanged retry budgets while
neutral core utilities own bounded credential redaction. |
| Stream cleanup could replace an already-mapped provider failure. |
Cleanup records safe metadata and preserves the ca…