The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents
by vercel5 of 6 standards met
Summary Aligns the xAI video provider with the xAI OpenAPI specification per #12829. Changes New provider options: โ signed URL where xAI will PUT the generated video (both generation and edit endpoints) โ end-user identifier for abuse monitoring Improved error handling: Check flag on video response; throw a specific error instead of a generic 'no URL' error when content is blocked Cost metadata:** Parse from the video status response Expose as in Tests Added comprehensive tests covering all new features and edge cases. Closes #12829 Part of #12825
Summary and only emit the deprecated and telemetry span attributes. The newer, standardized attributes โ , , , , and โ are never recorded. already emits all of these attributes correctly, creating an inconsistency for users who rely on OpenTelemetry tracing. Impact Prompt caching metrics () are invisible in traces from / Reasoning token usage () is not surfaced for non-streaming calls Dashboards querying the newer attribute names return no data for non-streaming calls Fix Added the missing attributes to both step-level and overall telemetry spans in and , matching behavior: The deprecated and are preserved for backward compatibility. Tests Updated telemetry snapshots for both and 2 consecutive clean passes**: 1979/1979 tests, 0 type errors Fixes #12801
Repository: vercel/ai. Description: The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents Stars: 22168, Forks: 3903. Primary language: TypeScript. Languages: TypeScript (76.3%), MDX (23.3%), JavaScript (0.3%), Vue (0.1%), CSS (0%). Homepage: https://ai-sdk.dev Topics: anthropic, artificial-intelligence, gemini, generative-ai, generative-ui, javascript, language-model, llm, nextjs, openai, react, svelte, typescript, vercel, vue. Latest release: @ai-sdk/fal@2.0.22 (16h ago). Open PRs: 100, open issues: 1111. Last activity: 2h ago. Community health: 87%. Top contributors: lgrammel, github-actions[bot], vercel-ai-sdk[bot], nicoalbanese, shaper, dancer, gr2m, jaredpalmer, MaxLeiter, aayush-kapoor and others.
TypeScript
Last 12 weeks ยท 907 commits
Summary Fixes #10202 The Bedrock API validation requires tool names to match the regex pattern , but tool names were being passed through without sanitization. This caused errors when invalid characters were present. Changes Added function that replaces invalid characters with underscores Applied sanitization before sending tool names to the Bedrock API Testing Added test coverage for: Dollar sign character (the reported issue) Various special characters (@ ! . / \ : * ? + = & % # etc.) Brackets and parentheses Unicode and emoji characters Real-world patterns (file paths, URLs, namespaces) Tested with Big List of Naughty Strings for edge cases All existing tests still pass (no regressions). Example Before: โ ValidationException After: โ (valid)
Summary Fixes #12801 and only emit the deprecated and telemetry span attributes. The newer, standardized attributes โ , , , , and โ are never recorded, even though already emits them. Changes Step-level span: Added all 5 missing attributes using (provider V3 usage type) Root-level span: Moved computation before , added all 5 attributes using the aggregated across all steps (matching behavior) Step-level span: Added all 5 missing attributes Root-level span: Added all 5 missing attributes Backwards compatibility The deprecated and attributes are preserved. Tests All 1979 tests pass (2 consecutive clean runs). 5 snapshots updated to include new attributes.
Problem When using the OpenAI Responses API with , reasoning items in the input still include an field. Azure OpenAI rejects requests containing reasoning item IDs when storage is disabled, breaking multi-turn conversations with reasoning models on Azure. Root Cause In , the branch (which correctly sends full reasoning content instead of ) was still including on the reasoning objects. Fix Omit the field from reasoning items when . The field is what enables multi-turn reasoning without server-side persistence โ the is only meaningful for lookups (the path), not for inline reasoning content. Tests Updated all existing reasoning test expectations to not include All 594 OpenAI package tests pass (2 consecutive clean runs) Fixes #12687