2026-03-26-model-deprecation-warnings

Ship Log: Model Deprecation Warnings

Date: 2026-03-26 Phase: 081-model-deprecation-warnings Author: Builder (automated)

What Shipped

Model deprecation warnings surfaced as HTTP response headers on completions requests. When a request routes to a model with an active deprecation alert (from the existing DeprecationDetector), the response includes:

  • X-BR-Deprecation: openai/gpt-4o sunset 2026-06-01, migrate to gpt-4.1 — human-readable notice
  • Deprecation: true — RFC 8594 standard header
  • Sunset: Mon, 01 Jun 2026 00:00:00 GMT — RFC 8594 sunset datetime

How It Works

  1. DeprecationDetector runs a probe cycle every 5 minutes, tracking 222+ models
  2. On each completions request (streaming and non-streaming), the resolved model is checked against in-memory alerts
  3. If an alert exists: three headers are set. If no alert: no-op (zero overhead for healthy models)
  4. Zero additional latency — reads from in-memory Map, no I/O

Lockstep Checklist

SurfaceStatusNotes
APIImplementedHeaders on both streaming and non-streaming
DocsImplementedThis ship log
SDK-TSN/AHeaders available via standard response metadata
SDK-PYN/AHeaders available via standard response metadata
MCPN/AMCP does not expose response headers
TestsImplemented5 tests covering all header scenarios
CLIN/ANo CLI changes
GTMN/AInternal reliability feature
DashboardN/ANo dashboard changes

Files Changed

  • src/api/routes/completions.ts (modified) — helper function + wiring in both paths
  • src/api/routes/deprecation-headers.test.ts (new) — 5 tests
  • src/api/server.ts (modified) — pass deprecationDetector to completions route
  • docs/ship-log/2026-03-26-model-deprecation-warnings.md (new)