[PR #13228] feat: bump AI SDK to v6 + add Opus 4.6 adaptive thinking #14570

Closed
opened 2026-02-16 18:19:21 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13228

State: closed
Merged: No


Fixes #13227

Bumps the full AI SDK ecosystem from v5 to v6 and adds Claude Opus 4.6 adaptive thinking support.

Changes

SDK bump (17 files, 199+/171-):

  • ai core: 5.0.124 → 6.0.81
  • @ai-sdk/provider: 2.0.1 → 3.0.8
  • @ai-sdk/provider-utils: 3.0.20 → 4.0.14
  • All 16 @ai-sdk/* provider packages to latest

Breaking change fixes:

  • Renamed createProviderDefinedToolFactory*createProviderToolFactory* (6 files)
  • Removed deprecated name property from tool factories (6 files)
  • LanguageModelV2LanguageModel union for V2/V3 compat
  • convertToModelMessages is now async → toModelMessages made async + callers updated
  • LanguageModelV3Middleware requires specificationVersion
  • PromiseLike doesn't have .catch() → wrapped with Promise.resolve()
  • Provider factory type relaxed for v3 interface compat

Opus 4.6 variants (transform.ts):

  • high: adaptive thinking + effort high
  • max: adaptive thinking + effort max
  • fast: adaptive thinking + effort high + speed fast

Verification

  • bun install
  • bun run typecheck ✓ (all 12 packages)
  • bun run build --single
  • Binary runs, opencode models lists all providers correctly
  • Pre-push hook passes (full turbo typecheck pipeline)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13228 **State:** closed **Merged:** No --- Fixes #13227 Bumps the full AI SDK ecosystem from v5 to v6 and adds Claude Opus 4.6 adaptive thinking support. ## Changes **SDK bump** (17 files, 199+/171-): - `ai` core: 5.0.124 → 6.0.81 - `@ai-sdk/provider`: 2.0.1 → 3.0.8 - `@ai-sdk/provider-utils`: 3.0.20 → 4.0.14 - All 16 `@ai-sdk/*` provider packages to latest **Breaking change fixes**: - Renamed `createProviderDefinedToolFactory*` → `createProviderToolFactory*` (6 files) - Removed deprecated `name` property from tool factories (6 files) - `LanguageModelV2` → `LanguageModel` union for V2/V3 compat - `convertToModelMessages` is now async → `toModelMessages` made async + callers updated - `LanguageModelV3Middleware` requires `specificationVersion` - `PromiseLike` doesn't have `.catch()` → wrapped with `Promise.resolve()` - Provider factory type relaxed for v3 interface compat **Opus 4.6 variants** (transform.ts): - `high`: adaptive thinking + effort high - `max`: adaptive thinking + effort max - `fast`: adaptive thinking + effort high + speed fast ## Verification - `bun install` ✓ - `bun run typecheck` ✓ (all 12 packages) - `bun run build --single` ✓ - Binary runs, `opencode models` lists all providers correctly - Pre-push hook passes (full turbo typecheck pipeline)
yindo added the pull-request label 2026-02-16 18:19:21 -05:00
yindo closed this issue 2026-02-16 18:19:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14570