Skip to content

chore: evaluate upgrading to AI SDK 7 #1115

Closed

Description

@Astro-Han

Context

AI SDK 7 (released 2026-06-25) grows the SDK from model-call primitives into a production agent platform. Going forward, new models and provider fixes land on v7 and the new provider major versions; the v6 line enters maintenance.

Current state: ai@^6.0.185 with @ai-sdk/anthropic@^3, @ai-sdk/google@^3, @ai-sdk/openai@^3, @ai-sdk/cohere@^3, @ai-sdk/openai-compatible@^2.

Current integration shape

  • The core integration sits at the provider-spec layer: model-adapter.ts (646 LOC), ai-sdk-backend.ts (4407 LOC), and ai-sdk-flow.ts (741 LOC) are built on LanguageModelV3 from @ai-sdk/provider. The fake backend and the entire conformance/contract test surface sit on this layer.
  • High-level API usage is just two generateText call sites (headless one-shot completion, history-compact summarizer) using the system option.
  • Zero usage of the renamed high-level APIs (experimental_*, onFinish, fullStream, maxSteps/stopWhen, telemetry, useChat); the agent loop is self-driven.

Impact assessment

AI SDK 7 change Impact on maka
Node 22+ / ESM-only Essentially none: repo is "type": "module"; Electron 39 embeds Node >=22. Verify pure-Node CI runs >=22; consider an engines pin.
Renames (system -> instructions, etc.) Two generateText call sites; the v7 codemod covers them.
Provider spec LanguageModelV3 -> V4 The real work: port model-adapter and the fake backend to V4 (new prompt/content shapes, supportedUrls, stream events, usage shape); bump the five official providers to their new majors.
Multi-step result semantics (cumulative usage, finalStep) Minimal; we drive our own loop.

What we would gain

  1. Ecosystem currency — new models and provider fixes only land on v7 + new provider majors. For an AI-agent product this debt compounds.
  2. Stricter stream errors — provider streams ending before a finish chunk are now errors, aligning with our resilient-streaming work.
  3. Top-level reasoning option — replaces our hand-managed provider-specific reasoning settings.
  4. Per-step performance statistics (response time, TTFT, tool time, output tokens/s).

What is YAGNI for us

WorkflowAgent durable execution, tool approvals, runtimeContext/toolsContext, HarnessAgent, MCP Apps, @ai-sdk/tui — maka already has in-house equivalents (permissions, storage/task runs, session-driver, TUI). Upgrade only; do not adopt the agent-platform features.

Proposal

  • Do not rush: v7 is three weeks old. Either wait for the 7.0.x line to settle, or spike now and target merge around 7.1.
  • Spike plan (worktree): run npx @ai-sdk/codemod v7, port the adapter + fake backend to LanguageModelV4, and validate behavioral parity with the conformance matrix and contract tests.
  • Independent of the TypeScript 7 evaluation (chore: evaluate upgrading to TypeScript 7 #1113); land as separate PRs.

Activity

  1. added
    enhancement
    on Jul 16, 2026
  2. Astro-Han commented on Jul 19, 2026

    @Astro-Han
    ContributorAuthor

    Closing — the evaluation and upgrade landed in #1198 (AI SDK v6 → v7, all providers to v4), with follow-up regressions fixed in #1209 and #1213. The only remaining item is the live provider smoke (Anthropic/Google/Cohere), which is gated on credentials rather than work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions