# Changelog

## [1.1.0] - 2026-07-09

### Added
- Bounded **5xx retry** for NVIDIA NIM (`NVIDIA_RETRY_SERVER_ERROR_MAX`, default 3) with separate backoff (`NVIDIA_RETRY_SERVER_ERROR_BASE_MS`, `NVIDIA_RETRY_SERVER_ERROR_CAP_MS`).
- **`nvidia-nim-server-error-exhausted`** marker triggers router failover (same as rate-limit exhaustion).
- **`5xx_retry`** and **`server_error_exhausted`** audit events; **`provider_response`** logs HTTP status + `x-request-id` to `~/.pi/nvidia-nim-retry.log`.
- `NVIDIA_RETRY_TEST_INJECT_500` for mock E2E tests.
- `NVIDIA_RETRY_TEST_SYNTHETIC_OK` for deterministic mock failover without live API calls.
- Mock router scenario `failover-after-500`.

### Changed
- `/nim-retry-status` and session stats now report 5xx retry/exhaustion counts and last request ID.
- User-facing message on 5xx exhaustion suggests `/model`, `/new`, or retry later.

## [1.0.0] - 2026-07-09

### Added
- Fork of [pi-extension-nvidia-nim](https://github.com/Tibbee/pi-nvidia-nim-provider) (MIT) under Diegovisk maintenance.
- Merged `pi-nvidia-rate-limit-retry` v2.0.3 stream wrapper for `nvidia` and `nvidia-nim` providers.
- `/nim-refresh` command — refresh live NIM model catalog cache (`~/.pi/nvidia-nim-cache.json`).
- `/nim-models` command — list registered models grouped by family with recommended free-dev stack.
- `scripts/refresh-metadata.mjs` — merge live API model IDs into `models/metadata.json`.
- `exampleRequestExtra` injection for top-level kwargs even when thinking is off (e.g. `media_io_kwargs`).
- Improved content-array normalization (empty arrays → `""`).

### Changed
- `isNvidiaCall()` now matches `provider === "nvidia-nim"` in addition to `nvidia` and OpenRouter `nvidia/*`.
- Nemotron Nano 9B v2 thinking token bounds sourced from metadata (`min_thinking_tokens` / `max_thinking_tokens`) instead of hardcoded handler values.
- `after_provider_response` 429/5xx notifications apply to both `nvidia-nim` and built-in `nvidia` providers when using registered models.

### Attribution
- Upstream provider catalog, family routing, and thinking handlers: Tibbee / pi-extension-nvidia-nim.
- Rate-limit retry architecture: Diegovisk / pi-nvidia-rate-limit-retry.
