The Vercel AI SDK has issued updates for its @ai-sdk/harness-claude-code and @ai-sdk/moonshotai packages. The @ai-sdk/harness-claude-code package, released on August 10, received a fix for built-in tool filtering and a new feature allowing custom environment variables. Concurrently, the @ai-sdk/moonshotai provider has undergone a substantial refactor, now directly managing its chat implementation and supporting video input.
Key Points
- The
@ai-sdk/harness-claude-codepackage received an update on August 10. - A fix was implemented for built-in tool filtering in the Claude code harness, specifically addressing the use of
inactiveToolswith a denylist. - The
createClaudeCode()function now includes an optionalenvproperty for custom environment variables. - The
@ai-sdk/moonshotaiprovider now owns its chat implementation, moving away from@ai-sdk/openai-compatible. - The Moonshot AI provider supports video input, converting video file parts (e.g.,
mediaType: 'video/mp4') to Moonshot'svideo_urlcontent parts. - Video input is supported for video-capable Moonshot models, including kimi-k3, kimi-k2.7-code, kimi-k2.6, and kimi-k2.5.
- Audio and PDF file parts now trigger client-side errors, as the Moonshot API does not support these types.
- The
reasoningHistory: 'preserved'option now maps to Moonshot'sthinking.keep: 'all'request field, with a warning for models lackingthinking.keepsupport. - New provider options include
promptCacheKeyandsafetyIdentifier. - The
reasoningEffortoption has been widened to'low' | 'high' | 'max'to align with Moonshot's documentation. - The generic
reasoningcall option now maps toreasoning_effort. - The SDK now natively passes
ms:// Files APIreferences through, as declared insupportedUrls.
Context
According to the Vercel AI SDK Changelog, the @ai-sdk/harness-claude-code update addresses specific functional improvements for developers working with Claude's code capabilities. The @ai-sdk/moonshotai update represents a strategic shift, with the provider taking direct ownership of its chat implementation rather than building on the @ai-sdk/openai-compatible base. This change allows for direct support of Moonshot-specific features, such as video input and detailed reasoning controls.
Why It Matters
These updates offer builders more granular control and expanded capabilities when integrating Claude's code tools and Moonshot AI models into their applications. The direct support for Moonshot's video input and reasoning controls, alongside the Claude harness improvements, enables more sophisticated and tailored AI-powered features.
What To Do
- Review the Vercel AI SDK Changelog for the
@ai-sdk/harness-claude-code@1.0.66release to understand the tool filtering fix and newenvproperty. - Examine the
@ai-sdk/moonshotai@3.0.32release notes to understand the implications of the chat implementation ownership and new video input support. - Test the
createClaudeCode()function with the newenvproperty to manage custom environment variables for Claude integrations. - Developers using Moonshot AI should update their SDK to leverage video input capabilities with supported models and adjust for client-side errors with audio and PDF file parts.
