Packages

@tanstack/ai

0.71.0 · 21 Oct 2026MIT593.9k / weekRepositoryHomepagenpmAtom feed

Latest releases

All 103 releases
  1. 0.71.x · latest line
  2. 0.71.0

    21 Oct 2026
    • Add computer use that runs the same code on OpenAI and on Anthropic. A driver controls the machine. The Playwright and sandbox drivers give each thread its own machine.

      New packages:

      Changes in existing packages:

      const computerUse = createComputerUse({
        driver: playwrightComputer({ startUrl: 'https://tanstack.com' }),
      })
      
      chat({
        adapter,
        messages,
        threadId,
        tools: computerUse.tools,
        middleware: [computerUse.middleware],
        interrupts: [computerUse.interrupt],
      })
      
      await computerUse.close(threadId) // one thread
      await computerUse.close() // every thread, and the browser

      The ai-core agent skill routes computer use to @tanstack/ai-computer-use and its three drivers.

  3. 0.70.x · maintenance
  4. 0.70.0

    19 Oct 2026
    • Subagent limits, and provider keys for agents.

    • A subagent can now return a plain value and call any activity.

    • Check a raw JSON Schema tool input before the tool runs. This covers plain JSON Schema tools and every MCP tool.

      Behavior change:

      Migration: if a JSON Schema tool must accept input that its schema rejects, widen the schema.

  5. 0.69.x · maintenance
  6. 0.69.0

    13 Oct 2026
    • Keep the order of Claude's thinking, text, and tool calls in one answer.

    • chat() can now retry a rate-limited model call by itself. Pass retry: { maxRetries, maxWaitMs? }. When the provider sends a wait time (retryAfterMs) with an error, chat() waits that long, then calls the model again.

      retry is off by default.

      chat() now also sends RUN_STARTED before a RUN_ERROR when the adapter failed before it sent a start.

    • Text adapters now set one stable code on RUN_ERROR when the input does not fit in the model's context window: code: 'context_overflow'. @tanstack/ai exports it as CONTEXT_OVERFLOW_CODE. The provider's own text stays in message.

      if (chunk.type === 'RUN_ERROR' && chunk.code === CONTEXT_OVERFLOW_CODE) {
        // shorten the messages, then call chat() again
      }

      These adapters set it: OpenAI and the other OpenAI-compatible adapters (from code: 'context_length_exceeded'), Anthropic, Gemini, Bedrock (Converse, Chat Completions, and Responses), OpenRouter, Grok, Cloudflare Workers AI, and BytePlus.

      Changes to code that reads the old values:

  7. 0.68.x · maintenance
  8. 0.68.0

    9 Oct 2026
    • fakeText() takes an input option, for example fakeText({ input: ['text', 'image'] }). It sets the fake's inputModalities, so you can test code that checks what a model accepts. It also sets the adapter's input modality type.

    • Fix a server tool call that the next turn sent twice when you use withPersistence. When a model call starts with a tool call and no text (often after thinking), StreamProcessor gave that message the id of the next model call. The next turn then replaced the stored answer with a copy that also held the tool call, so the provider got the same tool_use twice. The client now keeps the id of the message the tool call belongs to.

  9. 0.67.x · maintenance
  10. 0.67.0

    9 Oct 2026
    • Text adapters can now give inputModalities at run time: the input kinds that the model reads, for example ['text', 'image', 'document']. undefined means that the adapter does not know.

    • A middleware onAfterToolCall hook can now replace the result of a tool call. Return { type: 'replaceResult', result } from the hook.

    • Add fakeText() at the new @tanstack/ai/testing subpath. It is a text adapter that answers from a script. Use it to test chat(), tools, and middleware with no network and no API key.

Dependency tracking · free for 3 projects

Know when your own dependencies move

@tanstack/ai published 103 releases in the last 12 months. Inlinr folds the routine ones into a line and keeps the few that need you.

  • Advisories reach you

    An email when a critical or high advisory affects a project, before the next install.

  • Upgrades checked first

    Peer ranges, Node, ESM-only and types changes read before you bump.

  • Only what matters

    Majors and breaking notes stay; patches and sibling bumps fold into one line.

How dependency tracking works

Registry facts last checked 22 Oct 2026. Releases and advisories last read 22 Oct 2026.