AI SDK harness layer now supports native subscription authentication
Vercel’s AI SDK harness layer now authenticates harnesses via native subscriptions when supported, eliminating code changes and enabling seamless agent switching under the same interface.
Vercel’s AI SDK harness layer has introduced support for authenticating harnesses through their native subscriptions, provided the underlying harness supports this method. This update allows developers to switch between different coding agents—such as Claude Code or Cursor—without modifying application code, maintaining consistency across the HarnessAgent interface. The feature simplifies integration by removing the need for new settings or code adjustments, streamlining the development workflow.
The authentication process offers two modes: direct and auto. Direct mode uses explicit provider environment credentials when available, falling back to native subscriptions on the host. Auto mode follows the same logic unless AI Gateway credentials are configured. The ai-gateway mode exclusively relies on AI Gateway credentials, bypassing native subscriptions entirely. Credentials are resolved at the host boundary, ensuring security and centralized management.
Native subscription credentials remain securely stored on the host system, with OAuth access tokens refreshed as needed. In supported sandboxes, the harness receives placeholder credentials, while the actual token is injected into outbound requests directly on the host. This approach enhances security by isolating sensitive data from the harness execution environment.
The feature extends compatibility across multiple harness adapters, including Claude Code, Cline, Codex, Cursor, fx, GitHub Copilot, Grok Build, OpenCode, and Pi. Developers can leverage native subscription authentication wherever the harness itself supports subscription login, expanding flexibility without compromising security or requiring additional configuration.