# Changelog

> Changes to the Mortar API, the data plane and these docs, newest first.

Changes that affect how you call Mortar, newest first.

## October 30, 2026

### API

- The prompt optimizer runs in shadow mode by default: it leaves every prompt as sent, and `X-Mortar-Optimizer` reports what it would have removed. A deployment can still turn it on, or off.

## October 29, 2026

### Documentation

- Published these docs: a quickstart, authentication, an API reference for every data-plane endpoint, and guides to streaming, cache-friendly prompts and choosing a deployment model.
- Added the [model catalog](/models), with sample input, output and cached-input prices.

### API

- Added [`POST /v1/cost/analyze`](/docs/api/cost#analyze-a-prompt), which finds what a prompt wastes on prefill and how to fix it, and [`POST /v1/cost/estimate`](/docs/api/cost#estimate-a-monthly-bill), which projects a monthly bill at a cache hit rate. Neither needs a key.
- Prompt caching is priced: a token read from the cache costs a tenth of the input price, and a token written to it 1.25 times. [`GET /v1/models`](/docs/api/models#list-models) lists each model's `costPerMillionCacheRead` and `costPerMillionCacheWrite`. [`cost.update` and `session.metrics`](/docs/api/telemetry#reading-cache-and-cost-events) report the tokens read and written and what each cost, name their `baseline`, and report a negative `savedUsd` when the cache cost more than it saved. [`POST /v1/cost/estimate`](/docs/api/cost#estimate-a-monthly-bill) prices Mortar's cache the same way, so at a 0% hit rate it costs more than the same model with no cache.
- Added [`GET /readyz`](/docs/api/platform#check-readiness) for load balancers. It answers `503` while an instance shuts down.
- The [telemetry stream](/docs/api/telemetry#stream-serving-telemetry) is scoped to your organization. Send your API key to follow your own requests; without one, the stream opens but carries nothing.
- A chat completion without `X-Mortar-Session` or `user` starts a session of its own instead of sharing a default one, and every response names its session in `X-Mortar-Session`.
- Only the organization that started a generation can [stop it](/docs/api/chat-completions#stop-a-generation).
- Chat completions report the prompt optimizer's work in `X-Mortar-Optimizer`, and `X-Mortar-Optimize: off` opts a request out.
- The prompt optimizer is off unless a deployment turns it on or sets it to shadow mode, and `X-Mortar-Optimizer` reports how long it took in `elapsed_us`.
- [`GET /health`](/docs/api/platform#check-health) reports the build's version.
- The data plane now runs as a Go service. Endpoints, request fields and response formats are unchanged.
- Organizations have member roles. Creating, listing and revoking [API keys](/docs/authentication#create-a-key) needs the Admin or Owner role.

## October 19, 2026

### API

- Chat completions stream token by token as server-sent events. See [Stream responses](/docs/guides/streaming).
- Stopping a streamed reply keeps the text generated before the stop.
