🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ai-sdk/provider

Package Overview
Dependencies
Maintainers
3
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/provider - npm Package Compare versions

Comparing version
4.0.0-canary.15
to
4.0.0-canary.16
+6
-0
CHANGELOG.md
# @ai-sdk/provider
## 4.0.0-canary.16
### Major Changes
- 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
## 4.0.0-canary.15

@@ -4,0 +10,0 @@

+1
-1
{
"name": "@ai-sdk/provider",
"version": "4.0.0-canary.15",
"version": "4.0.0-canary.16",
"type": "module",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -8,3 +8,2 @@ import type { JSONValue } from '../../json-value/json-value';

import type { SharedV4ProviderOptions } from '../../shared/v4/shared-v4-provider-options';
import type { SharedV4ProviderReference } from '../../shared/v4/shared-v4-provider-reference';

@@ -363,11 +362,24 @@ /**

| {
type: 'file-data';
type: 'file';
/**
* Base-64 encoded media data.
* File data as a tagged discriminated union:
*
* - `{ type: 'data', data }`: raw bytes (Uint8Array) or base64-encoded string.
* - `{ type: 'url', url }`: a URL that points to the file.
* - `{ type: 'reference', reference }`: a provider reference (`{ [provider]: id }`).
* - `{ type: 'text', text }`: inline text content (e.g. an inline text document).
*/
data: string;
data: SharedV4FileData;
/**
* IANA media type.
* Either a full IANA media type (`type/subtype`, e.g. `image/png`) or just
* the top-level IANA segment (e.g. `image`, `audio`, `video`, `text`).
*
* `*`-subtype wildcards (e.g. `image/*`) are normalized as equivalent to the
* top-level segment alone (e.g. `image`). Providers can use the helpers in
* `@ai-sdk/provider-utils` (`isFullMediaType`, `getTopLevelMediaType`,
* `detectMediaType`) to resolve the field according to their API
* requirements.
*
* @see https://www.iana.org/assignments/media-types/media-types.xhtml

@@ -388,36 +400,3 @@ */

| {
type: 'file-url';
/**
* URL of the file.
*/
url: string;
/**
* IANA media type.
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
*/
mediaType: string;
/**
* Provider-specific options.
*/
providerOptions?: SharedV4ProviderOptions;
}
| {
type: 'file-reference';
/**
* Provider-specific references for the file.
* The key is the provider name, e.g. 'openai' or 'anthropic'.
*/
providerReference: SharedV4ProviderReference;
/**
* Provider-specific options.
*/
providerOptions?: SharedV4ProviderOptions;
}
| {
/**
* Custom content part. This can be used to implement

@@ -424,0 +403,0 @@ * provider-specific content parts.

Sorry, the diff of this file is too big to display