Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vercel/ai
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ai@6.0.81
Choose a base ref
...
head repository: vercel/ai
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ai@6.0.82
Choose a head ref
  • 6 commits
  • 52 files changed
  • 3 contributors

Commits on Feb 11, 2026

  1. fix(xai): add support for response.function_call_arguments streaming …

    …events (#12456)
    
    When using xAI Grok models (e.g. `grok-4-1-fast-reasoning`) with
    function tools via the Responses API, the model streams
    `response.function_call_arguments.delta` and
    `response.function_call_arguments.done` events — standard Responses API
    events also used by OpenAI. The `@ai-sdk/xai` provider's Zod schema did
    not include these event types, causing `AI_TypeValidationError` and
    breaking the entire stream whenever a function tool call was attempted.
    
    **Summary**
    
    - Added `response.function_call_arguments.delta` and
    `response.function_call_arguments.done` to `xaiResponsesChunkSchema` in
    `xai-responses-api.ts`
    - Updated the stream handler in `xai-responses-language-model.ts` to:
      - Track ongoing tool calls by `output_index`
    - Emit `tool-input-start` on `response.output_item.added` for
    `function_call` items
    - Emit `tool-input-delta` for each
    `response.function_call_arguments.delta` event
    - Emit `tool-input-end` and `tool-call` on `response.output_item.done`
    (once arguments are fully received)
    - Skip `response.custom_tool_call_input.delta/done` events for
    `function_call` items (these are handled by the output_item events)
    - Added unit test for function call argument streaming
    
    **Manual Verification**
    
    Built the patched `@ai-sdk/xai` locally and ran an e2e test against the
    real xAI API using `grok-4-1-fast-reasoning` with a function tool:
    
    **Before fix** — `AI_TypeValidationError` on
    `response.function_call_arguments.done`:
    ```
    AI_TypeValidationError: Type validation failed: Value: {
      "sequence_number":4,
      "type":"response.function_call_arguments.done",
      "arguments":"{}",
      "item_id":"fc_14f28817-...",
      "output_index":0
    }
    ```
    
    **After fix** — full streaming pipeline works:
    ```
    tool-input-start:  PASS
    tool-input-delta:  PASS
    tool-call:         PASS
    no errors:         PASS
    ```
    
    **Checklist**
    
    - [x] Tests have been added / updated (for bug fixes / features)
    - [ ] Documentation has been added / updated (for bug fixes / features)
    - [x] 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 function tool calls failing with `AI_TypeValidationError` for xAI
    Grok models using the Responses API.
    ctate authored Feb 11, 2026
    Configuration menu
    Copy the full SHA
    902e93b View commit details
    Browse the repository at this point in the history
  2. Version Packages (#12458)

    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.54
    
    ### Patch Changes
    
    - 902e93b: Add support for `response.function_call_arguments.delta` and
    `response.function_call_arguments.done` streaming events in the xAI
    Responses API provider. Previously, xAI Grok models using function tools
    would fail with `AI_TypeValidationError` because these standard
    Responses API events were missing from the Zod schema and stream
    handler.
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Feb 11, 2026
    Configuration menu
    Copy the full SHA
    163764d View commit details
    Browse the repository at this point in the history
  3. fix (provider/google-vertex): pass mime type with i2v video generation (

    #12462)
    
    ## Background
    
    When generating videos from images using the Google Vertex AI provider,
    the MIME type was not being passed along with the base64-encoded image
    data. This resulted in Vertex failing with an error re: missing mime
    type for media.
    
    ## Summary
    
    This PR fixes the Google Vertex provider's image-to-video generation by
    properly passing the MIME type with the base64-encoded image data.
    
    ## Manual Verification
    
    Tested the image-to-video generation functionality with a base64-encoded
    image and confirmed that the video is generated correctly with the MIME
    type properly passed to the API.
    
    ## Checklist
    
    - [x] Tests have been added / updated (for bug fixes / features)
    - [x] Documentation has been added / updated (for bug fixes / features)
    - [x] 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)
    shaper authored Feb 11, 2026
    Configuration menu
    Copy the full SHA
    a8835e9 View commit details
    Browse the repository at this point in the history
  4. Version Packages (#12465)

    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-vertex@4.0.54
    
    ### Patch Changes
    
    - a8835e9: fix (provider/google-vertex): pass mime type with i2v video
    generation
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Feb 11, 2026
    Configuration menu
    Copy the full SHA
    ce66661 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2026

  1. fix (provider/gateway): add missing warning types for video response …

    …parsing (#12474)
    
    ## Background
    
    The gateway video model was missing support for certain warning types in
    the response parsing schema, specifically for 'unsupported' and
    'compatibility' warnings. This limited the ability to properly handle
    and display these warning types when they were returned from providers.
    
    ## Summary
    
    Added support for additional warning types in the gateway video model
    response parsing:
    - Added 'unsupported' warning type with feature and optional details
    fields
    - Added 'compatibility' warning type with feature and optional details
    fields
    - Updated the schema to use a discriminated union for proper type
    validation
    - Added tests to verify the correct handling of these new warning types
    
    ## Checklist
    
    - [x] Tests have been added / updated (for bug fixes / features)
    - [x] 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 an issue where 'unsupported' and 'compatibility' warnings from
    video providers weren't properly handled by the gateway.
    shaper authored Feb 12, 2026
    Configuration menu
    Copy the full SHA
    1819bc1 View commit details
    Browse the repository at this point in the history
  2. Version Packages (#12476)

    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.82
    
    ### Patch Changes
    
    -   Updated dependencies [1819bc1]
        -   @ai-sdk/gateway@3.0.42
    
    ## @ai-sdk/angular@2.0.83
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    ## @ai-sdk/gateway@3.0.42
    
    ### Patch Changes
    
    - 1819bc1: fix (provider/gateway): add missing warning types for video
    response parsing
    
    ## @ai-sdk/langchain@2.0.87
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    ## @ai-sdk/llamaindex@2.0.82
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    ## @ai-sdk/react@3.0.84
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    ## @ai-sdk/rsc@2.0.82
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    ## @ai-sdk/svelte@4.0.82
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    ## @ai-sdk/vue@3.0.82
    
    ### Patch Changes
    
    -   ai@6.0.82
    
    Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
    vercel-ai-sdk[bot] authored Feb 12, 2026
    Configuration menu
    Copy the full SHA
    7a29d97 View commit details
    Browse the repository at this point in the history
Loading