AIOptimize · KB digest

v0.3.0-preview18 changes since first run

KB freshness2026-05-06
Change windowfirst run → v0.3.0-preview
TL;DR

Anthropic retired claude-3-haiku-20240307 today — if any code path still pins it, swap to claude-haiku-4-5-20251001 before your next deploy. Claude Code v2.1.118 → v2.1.131 ships seven adoptable QoL features (Bedrock service-tier env var, MCP alwaysLoad, gateway-aware /model picker, vim visual mode) plus two bug fixes for VS Code on Windows and the OAuth retry loop. Four @ai-sdk packages got transitive canary bumps with no API change — collapsed into the rollup below.

Best practice spotlight

claude-code-vscode-windows-fix

Rule: Upgrade to v2.1.131 if you use the Claude Code VS Code extension on Windows — earlier 2.1.x versions failed to activate due to a hardcoded build path.

Why: A `createRequire` polyfill bug in the bundled SDK shipped a Linux-shaped path that Windows ignored, so the extension never activated. v2.1.131 also fixes a missing `x-api-key` header on Mantle-endpoint requests.

Read the provider docs
Verified 2026-05-06 · claude-code
Quick wins
  • 1Pin a model only when you have a reason. Most skills should let the harness default win.
  • 2Cache reused system prompts >1024 tokens — typical hits are 25–90% cheaper and 85% faster.

New techniques

14
BREAKING anthropic

anthropic-haiku-3-retirement

Rule: If any code path still calls `claude-3-haiku-20240307`, switch the model id to `claude-haiku-4-5-20251001` before your next deploy — the legacy id now returns an error from Anthropic.

Haiku 3 was retired on 2026-05-06. Production traffic on the legacy id began returning 4xx errors immediately. Haiku 4.5 is roughly 2x faster at similar quality and uses the same request shape, so the migration is a string swap.

Read more
FEATURE claude-code

claude-code-bedrock-service-tier

Rule: If you run Claude Code on Bedrock with mixed interactive + batch workloads, set `ANTHROPIC_BEDROCK_SERVICE_TIER=priority` for IDE sessions and `=flex` for batch jobs.

Claude Code v2.1.122 adds a one-line env-var path to Bedrock's service-tier header (`default` / `flex` / `priority`). Previously you had to subclass the client to pass it. Service tier trades cost vs. latency — `flex` is cheaper for batch, `priority` is faster for interactive.

Read more
FEATURE claude-code

claude-code-config-persistence

Rule: Use `/config` to set theme / editor mode / verbose once — v2.1.119 now persists those settings to `~/.claude/settings.json` with full project / local / policy override precedence.

`/config` settings used to evaporate at session end. v2.1.119 writes them to the same file the harness already reads, so they compose cleanly with project- and policy-level settings. New `prUrlTemplate` setting points the footer PR badge at non-GitHub providers (GitLab, Gitea, etc.).

Read more
FEATURE claude-code

claude-code-gateway-aware-model-picker

Rule: If you point `ANTHROPIC_BASE_URL` at an Anthropic-compatible gateway, the v2.1.126 `/model` picker now lists your gateway's models alongside the Anthropic defaults — no extra config.

Teams routing through internal model gateways (e.g. for spend tracking or model-bake-off) previously had to memorize gateway model ids. v2.1.126 queries `/v1/models` against your base URL and merges the result into the picker. `claude project purge` ships in the same release as a clean-state reset.

Read more
+6 more in this category — mcp-alwaysload mcp-zero-tool-warning plugin-url-flag vim-visual-mode oauth-401-retry-fix vscode-windows-fix
Also bumped this cycle: @ai-sdk/cohere@2.0.29 @ai-sdk/google-vertex@3.0.137 @ai-sdk/svelte@5.0.0-canary.121 @ai-sdk/vue@2.0.185

New deprecated models

4
DEPRECATED anthropic

claude-3-haiku-20240307

Deprecated 2026-05-06

Replace with: claude-haiku-4-5-20251001

Anthropic retired Claude Haiku 3 on 2026-05-06. All requests to `claude-3-haiku-20240307` now return an error. Migrate to `claude-haiku-4-5-20251001` — same tier, ~2x faster, equivalent quality on the public benchmarks Anthropic publishes.

DEPRECATED anthropic

claude-3-opus-20240229

Deprecated 2025-07-01

Replace with: claude-opus-4-7

Opus 4.x family outperforms claude-3-opus on every public benchmark, with lower latency and price.

DEPRECATED anthropic

claude-3-sonnet-20240229

Deprecated 2025-04-01

Replace with: claude-sonnet-4-6

Sonnet 4.6 is the current mid-tier default.

DEPRECATED openai

gpt-3.5-turbo

Deprecated 2025-01-01

Replace with: gpt-4o-mini

4o-mini is cheaper and better on every standard benchmark.