-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Comparing changes
Open a pull request
base repository: vercel/ai
base: ai@6.0.98
head repository: vercel/ai
compare: ai@6.0.99
- 16 commits
- 2,022 files changed
- 7 contributors
Commits on Feb 24, 2026
-
chore(examples): reorganize ai-functions examples into provider folde…
…rs (#12812) ## Background we moved ai-functions examples from flat files to provider folders so paths are easier to navigate and scale this also aligned a few inconsistent names left after the move ## Summary - reorganize these groups into folder-based provider paths - `stream-text` - `generate-text` - `agent` - `embed` - `embed-many` - `generate-video` - `generate-speech` - remove old top-level files for those migrated groups - normalize a few names during the move - `url-context-wtih-google-search.ts` -> `url-context-with-google-search.ts` - `responses-lmstudio*` -> `lmstudio*` in open-responses folders - update gateway timeout run-path comments to the new folder paths ## Manual Verification - ran typecheck - `pnpm exec tsc -p tsconfig.with-examples.json --noEmit` - ran one example in each migrated group - `pnpm exec tsx src/stream-text/anthropic/index.ts` - `pnpm exec tsx src/generate-text/mock/index.ts` - `pnpm exec tsx src/agent/anthropic/cache-instruction.ts` - `pnpm exec tsx src/embed/gateway/index.ts` - `pnpm exec tsx src/embed-many/gateway/index.ts` - `pnpm exec tsx src/generate-video/gateway/timeout.ts` - `pnpm exec tsx src/generate-speech/openai/index.ts` ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
Configuration menu - View commit details
-
Copy full SHA for b5877a6 - Browse repository at this point
Copy the full SHA b5877a6View commit details -
docs(agents): document ai-functions examples folder layout (#12817)
## Background the ai-functions examples were moved to provider folders with `basic.ts` entry files `AGENTS.md` still showed the old flat path example and had no explicit layout guidance ## Summary - update the running example command to `pnpm tsx src/stream-text/openai/basic.ts` - add an `AI Functions Example Layout` section in `AGENTS.md` - document the expected pattern `examples/ai-functions/src/<function>/<provider>/` - document `basic.ts` as the provider entry file - clarify that flat top-level provider files should not be created ## Manual Verification - reviewed rendered markdown in `AGENTS.md` - confirmed the paths match the current examples structure ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
Configuration menu - View commit details
-
Copy full SHA for 7de3a95 - Browse repository at this point
Copy the full SHA 7de3a95View commit details -
feat(provider/xai): add missing image model IDs (#12813)
## Summary - Adds `grok-imagine-image-pro` and `grok-2-image-1212` to `XaiImageModelId` type for IDE autocomplete support - Adds example for `grok-imagine-image-pro` image generation All other model IDs from [#12808](#12808) were already present in the appropriate type unions (`XaiChatModelId`, `XaiImageModelId`, `XaiVideoModelId`). The two missing entries were both image model IDs that hadn't been added to `XaiImageModelId`. Verified against the [xAI models documentation](https://docs.x.ai/docs/models). ## Test plan - [x] `pnpm test` passes (217/217 tests) - [x] `pnpm build` succeeds - [x] TypeScript type check passes for `packages/xai` and `examples/ai-functions` Closes #12808 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 6af6c5c - Browse repository at this point
Copy the full SHA 6af6c5cView commit details -
feat(examples): add gpt-5.3-codex stream and generate examples (#12818)
## Background a new model `gpt-5.3-codex` was added in #12814 we should have ai-functions coverage examples for both `generateText` and `streamText` ## Summary - add `generate-text` example for `gpt-5.3-codex` - `examples/ai-functions/src/generate-text/openai/gpt-5-3-codex.ts` - add `stream-text` example for `gpt-5.3-codex` - `examples/ai-functions/src/stream-text/openai/gpt-5-3-codex.ts` ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
Configuration menu - View commit details
-
Copy full SHA for beb95f9 - Browse repository at this point
Copy the full SHA beb95f9View commit details -
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ai-sdk/xai@3.0.58 ### Patch Changes - 6af6c5c: Added `grok-imagine-image-pro` and `grok-2-image-1212` to XaiImageModelId type for better autocomplete support. Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
vercel-ai-sdk[bot] authoredFeb 24, 2026 Configuration menu - View commit details
-
Copy full SHA for 0679529 - Browse repository at this point
Copy the full SHA 0679529View commit details -
feat(provider/openai): add missing model IDs (#12820)
## Summary Adds missing model IDs from [#12810](#12810) to the appropriate type unions, verified against the live OpenAI API. ### Added to `OpenAIChatModelId` - `gpt-4o-audio-preview`, `gpt-4o-audio-preview-2024-12-17`, `gpt-4o-audio-preview-2025-06-03` - `gpt-4o-mini-audio-preview`, `gpt-4o-mini-audio-preview-2024-12-17` - `gpt-4o-search-preview`, `gpt-4o-search-preview-2025-03-11` - `gpt-4o-mini-search-preview`, `gpt-4o-mini-search-preview-2025-03-11` - `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.2-pro-2025-12-11` - `gpt-3.5-turbo-16k` ### Added to `OpenAIResponsesModelId` - `o4-mini`, `o4-mini-2025-04-16` - `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.2-pro-2025-12-11` ### Added to `OpenAIImageModelId` - `chatgpt-image-latest` ### Added to `OpenAISpeechModelId` - `tts-1-1106`, `tts-1-hd-1106`, `gpt-4o-mini-tts-2025-03-20`, `gpt-4o-mini-tts-2025-12-15` ### Added to `OpenAITranscriptionModelId` - `gpt-4o-transcribe-diarize`, `gpt-4o-mini-transcribe-2025-03-20`, `gpt-4o-mini-transcribe-2025-12-15` ### Added to `OpenAICompletionModelId` - `gpt-3.5-turbo-instruct-0914` ### Skipped (no corresponding type union) Realtime models (`gpt-realtime-*`), standalone audio models (`gpt-audio-*`), moderation models (`omni-moderation-*`), search API models (`gpt-5-search-api-*`), Sora video models, and base models (`davinci-002`, `babbage-002`). ### Excluded after verification - `gpt-4.5-preview` — model does not exist on OpenAI - `gpt-5-pro` — responses-only, not supported with chat completions API - Audio/search preview models removed from responses type — not supported with Responses API - `gpt-3.5-turbo-16k` removed from responses type — not supported with Responses API ## Test plan - [x] All 584 tests pass (`pnpm test` in packages/openai) - [x] Build succeeds - [x] All new chat model IDs verified against live Chat Completions API - [x] All new responses model IDs verified against live Responses API Closes #12810 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 624e651 - Browse repository at this point
Copy the full SHA 624e651View commit details -
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ai-sdk/azure@3.0.34 ### Patch Changes - Updated dependencies [624e651] - @ai-sdk/openai@3.0.33 ## @ai-sdk/openai@3.0.33 ### Patch Changes - 624e651: Added missing model IDs to OpenAIChatModelId, OpenAIResponsesModelId, OpenAIImageModelId, OpenAISpeechModelId, OpenAITranscriptionModelId, and OpenAICompletionModelId types for better autocomplete support. Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
vercel-ai-sdk[bot] authoredFeb 24, 2026 Configuration menu - View commit details
-
Copy full SHA for 41eaf7a - Browse repository at this point
Copy the full SHA 41eaf7aView commit details -
feat(provider/google): add missing model IDs (#12819)
## Summary - Added 18 new model IDs to `GoogleGenerativeAIModelId` type in `google-generative-ai-options.ts` for better autocomplete support, including gemini-2.0, gemini-2.5, gemini-3.1, gemma, robotics, and other new model variants - Added 2 new model IDs (`veo-3.0-generate-001`, `veo-3.0-fast-generate-001`) to `GoogleGenerativeAIVideoModelId` type in `google-generative-ai-video-settings.ts` - Added a patch changeset for `@ai-sdk/google` Closes #12809 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 2fa3ca8 - Browse repository at this point
Copy the full SHA 2fa3ca8View commit details -
docs(contributing): first draft of project philosophies (#12693)
## Summary Adds a first draft of the project philosophies to our contributing docs, all based on the conversations we had in the past few weeks around this. The goal of this PR is to create a first draft and have it in the repo. **I would suggest we focus on correctness, rather than completeness.** ## Future Work We can and will add more sections or bullet points as we go. The most important thing for this PR is that we're aligned that what's documented here is indeed what we think.
Configuration menu - View commit details
-
Copy full SHA for 584cf08 - Browse repository at this point
Copy the full SHA 584cf08View commit details -
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ai-sdk/google@3.0.31 ### Patch Changes - 2fa3ca8: Added missing model IDs to GoogleGenerativeAIModelId and GoogleGenerativeAIVideoModelId types for better autocomplete support. ## @ai-sdk/google-vertex@4.0.62 ### Patch Changes - Updated dependencies [2fa3ca8] - @ai-sdk/google@3.0.31 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
vercel-ai-sdk[bot] authoredFeb 24, 2026 Configuration menu - View commit details
-
Copy full SHA for 704abfb - Browse repository at this point
Copy the full SHA 704abfbView commit details -
fix: add automatic caching for anthropic (#12743)
## Background Anthropic now supports automatic caching. The top level provider options supports it already, however it gets stripped before being sent to the provider. ## Summary Pass the cacheControl flag through the provider. ## Manual Verification Adds unit test. ## Checklist - [X] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [X] I have reviewed this pull request (self-review) ## Related Issues Fixes #12712 --------- Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 17978c6 - Browse repository at this point
Copy the full SHA 17978c6View commit details -
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ai-sdk/amazon-bedrock@4.0.64 ### Patch Changes - Updated dependencies [17978c6] - @ai-sdk/anthropic@3.0.47 ## @ai-sdk/anthropic@3.0.47 ### Patch Changes - 17978c6: Pass `cacheControl` provider option as top-level `cache_control` in Anthropic API request body to support automatic caching. ## @ai-sdk/google-vertex@4.0.63 ### Patch Changes - Updated dependencies [17978c6] - @ai-sdk/anthropic@3.0.47 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
vercel-ai-sdk[bot] authoredFeb 24, 2026 Configuration menu - View commit details
-
Copy full SHA for d1c96f3 - Browse repository at this point
Copy the full SHA d1c96f3View commit details -
feat(provider/xai): add resolution provider option to image model (#1…
…2831) ## Summary - Adds `resolution` (`"1k"` | `"2k"`) as a provider option for xAI image models, enabling higher resolution output for grok-imagine models - Includes test coverage and an example demonstrating the new option Closes #12830 ## Test plan - [x] Unit test verifying `resolution` is passed through to the API request body - [x] All existing xai tests pass (`pnpm test:node` — 218 tests) - [x] Type check passes - [x] confirm that the new example is working --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 8641667 - Browse repository at this point
Copy the full SHA 8641667View commit details -
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ai-sdk/xai@3.0.59 ### Patch Changes - 8641667: Added `resolution` provider option (`"1k"` or `"2k"`) for xAI image models, enabling higher resolution output for grok-imagine models. Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
vercel-ai-sdk[bot] authoredFeb 24, 2026 Configuration menu - View commit details
-
Copy full SHA for 3376889 - Browse repository at this point
Copy the full SHA 3376889View commit details -
feat (provider/gateway): pass through project id when available for o…
…11y (#12835) ## Background The gateway provider needs to pass through Vercel project ID information for observability purposes when it's available in the environment. ## Changes Added support for passing through the `VERCEL_PROJECT_ID` environment variable as the `ai-o11y-project-id` header in the gateway provider's observability headers. This enables better tracking and identification of requests by project when using the AI SDK gateway in Vercel deployments.
Configuration menu - View commit details
-
Copy full SHA for e8172b6 - Browse repository at this point
Copy the full SHA e8172b6View commit details -
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## ai@6.0.99 ### Patch Changes - Updated dependencies [e8172b6] - @ai-sdk/gateway@3.0.55 ## @ai-sdk/angular@2.0.100 ### Patch Changes - ai@6.0.99 ## @ai-sdk/gateway@3.0.55 ### Patch Changes - e8172b6: feat (provider/gateway): pass through project id when available for o11y ## @ai-sdk/langchain@2.0.105 ### Patch Changes - ai@6.0.99 ## @ai-sdk/llamaindex@2.0.99 ### Patch Changes - ai@6.0.99 ## @ai-sdk/react@3.0.101 ### Patch Changes - ai@6.0.99 ## @ai-sdk/rsc@2.0.99 ### Patch Changes - ai@6.0.99 ## @ai-sdk/svelte@4.0.99 ### Patch Changes - ai@6.0.99 ## @ai-sdk/vue@3.0.99 ### Patch Changes - ai@6.0.99 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
vercel-ai-sdk[bot] authoredFeb 24, 2026 Configuration menu - View commit details
-
Copy full SHA for 770b225 - Browse repository at this point
Copy the full SHA 770b225View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff ai@6.0.98...ai@6.0.99