Skip to content

ai@7.0.178

Choose a tag to compare

@github-actions github-actions released this 20 Nov 16:51
· 1 commit to main since this release
3dad57f

Patch Changes

  • 0b8cbfa: generateText and streamText passed the messages array that prepareStep returned to tools and tool approval functions as it was. When prepareStep returned the same array for several steps or calls, tool approval functions could not tell the tool calls of one model response from the tool calls of another. The messages array of every step is now created for that step, so the messages that prepareStep returns are copied.

  • 6815153: fix(ai): forward the preliminary flag on provider-executed tool results in streamText, so preliminary results (e.g. OpenAI image generation previews) are no longer recorded as final tool results in step content and response messages

  • 15bfd6b: add telemetry, runtime context and lifecycle callbacks to experimental_extract

  • 15bfd6b: redact file urls from download errors sent to telemetry

  • 2613bb4: fix(ai): build the ai, ai/internal, and ai/test entrypoints together so their types stay compatible with each other

  • 63593a7: With experimental_toolApprovalSecret configured, generateText and streamText signed the approval request of a tool call that the tool approval policy had denied automatically. A client that controls the message history could send that request back with an approved response and have the denied tool call executed. Approval requests of automatically denied tool calls are no longer signed, so such a response is rejected with AI_InvalidToolApprovalSignatureError.

    Signatures that earlier versions issued for automatic denials stay valid. To invalidate them, rotate the secret passed to experimental_toolApprovalSecret. Approval requests that are still waiting for a user decision then have to be requested again.

  • Updated dependencies [1d2c2ff]

  • Updated dependencies [a51981c]

  • Updated dependencies [875de7b]

    • @ai-sdk/provider-utils@5.0.83
    • @ai-sdk/gateway@4.0.151