New:Socket for Asana Is Now Available.Learn more
Get Started

@ai-sdk/gateway

Package Overview
Dependencies
Maintainers
3
Versions
683
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/gateway - npm Package Compare versions

Comparing version
4.0.63
to
4.0.64
+27
src/gateway-provider-metadata.ts
import type { JSONValue } from '@ai-sdk/provider';
/**
* Metadata for an asynchronous AI Gateway job.
*/
export type GatewayAsyncJobMetadata = {
readonly jobId: string;
readonly status: string;
/**
* Secret for verifying customer webhook deliveries. This is sensitive,
* start-response-only metadata and must not be logged or forwarded.
*/
readonly webhookSigningSecret?: string;
readonly [key: string]: JSONValue | undefined;
};
/**
* Shape of the inner `providerMetadata.gateway` object returned by AI Gateway
* operations.
*
* Additional fields may be added without a package update.
*/
export type GatewayProviderMetadata = {
readonly asyncJob?: GatewayAsyncJobMetadata;
readonly [key: string]: JSONValue | undefined;
};
+26
-2

@@ -1,2 +0,2 @@

import { LanguageModelV4, ProviderV4, Experimental_BatchLanguageModelV4, EmbeddingModelV4, ImageModelV4, Experimental_VideoModelV4, RerankingModelV4, SpeechModelV4, TranscriptionModelV4, Experimental_RealtimeFactoryV4, TypeValidationError } from '@ai-sdk/provider';
import { LanguageModelV4, ProviderV4, Experimental_BatchLanguageModelV4, EmbeddingModelV4, ImageModelV4, Experimental_VideoModelV4, RerankingModelV4, SpeechModelV4, TranscriptionModelV4, Experimental_RealtimeFactoryV4, JSONValue, TypeValidationError } from '@ai-sdk/provider';
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

@@ -1061,2 +1061,26 @@ import { FetchFunction, WebSocketConstructor, InferSchema } from '@ai-sdk/provider-utils';

/**
* Metadata for an asynchronous AI Gateway job.
*/
type GatewayAsyncJobMetadata = {
readonly jobId: string;
readonly status: string;
/**
* Secret for verifying customer webhook deliveries. This is sensitive,
* start-response-only metadata and must not be logged or forwarded.
*/
readonly webhookSigningSecret?: string;
readonly [key: string]: JSONValue | undefined;
};
/**
* Shape of the inner `providerMetadata.gateway` object returned by AI Gateway
* operations.
*
* Additional fields may be added without a package update.
*/
type GatewayProviderMetadata = {
readonly asyncJob?: GatewayAsyncJobMetadata;
readonly [key: string]: JSONValue | undefined;
};
type GatewayProviderOptions = {

@@ -1323,2 +1347,2 @@ /**

export { GATEWAY_AUTH_SUBPROTOCOL_PREFIX, GATEWAY_REALTIME_SUBPROTOCOL, GATEWAY_TEAM_SUBPROTOCOL_PREFIX, GATEWAY_TRANSCRIPTION_SUBPROTOCOL, GatewayAuthenticationError, type GatewayCreditsResponse, type GatewayEmbeddingModelId, GatewayError, type GatewayErrorResponse, GatewayFailedDependencyError, GatewayForbiddenError, type GatewayGenerationInfo, type GatewayGenerationInfoParams, type GatewayImageModelId, GatewayInternalServerError, GatewayInvalidRequestError, type GatewayLanguageModelEntry, type GatewayProviderOptions as GatewayLanguageModelOptions, type GatewayLanguageModelSpecification, type GatewayLanguageModelEntry as GatewayModelEntry, type GatewayModelId, GatewayModelNotFoundError, GatewayNotFoundError, type GatewayProvider, type GatewayProviderOptions, type GatewayProviderSettings, GatewayRateLimitError, type GatewayRealtimeModelId, type GatewayRerankingModelId, GatewayResponseError, type GatewaySpeechModelId, type GatewaySpendReportParams, type GatewaySpendReportResponse, type GatewaySpendReportRow, type GatewayTranscriptionModelId, type GatewayVideoModelId, VERSION, createGateway, createGateway as createGatewayProvider, gateway, getGatewayRealtimeAuthToken, getGatewayRealtimeProtocols, getGatewayRealtimeTeamIdOrSlug, getGatewayTranscriptionProtocols };
export { GATEWAY_AUTH_SUBPROTOCOL_PREFIX, GATEWAY_REALTIME_SUBPROTOCOL, GATEWAY_TEAM_SUBPROTOCOL_PREFIX, GATEWAY_TRANSCRIPTION_SUBPROTOCOL, type GatewayAsyncJobMetadata, GatewayAuthenticationError, type GatewayCreditsResponse, type GatewayEmbeddingModelId, GatewayError, type GatewayErrorResponse, GatewayFailedDependencyError, GatewayForbiddenError, type GatewayGenerationInfo, type GatewayGenerationInfoParams, type GatewayImageModelId, GatewayInternalServerError, GatewayInvalidRequestError, type GatewayLanguageModelEntry, type GatewayProviderOptions as GatewayLanguageModelOptions, type GatewayLanguageModelSpecification, type GatewayLanguageModelEntry as GatewayModelEntry, type GatewayModelId, GatewayModelNotFoundError, GatewayNotFoundError, type GatewayProvider, type GatewayProviderMetadata, type GatewayProviderOptions, type GatewayProviderSettings, GatewayRateLimitError, type GatewayRealtimeModelId, type GatewayRerankingModelId, GatewayResponseError, type GatewaySpeechModelId, type GatewaySpendReportParams, type GatewaySpendReportResponse, type GatewaySpendReportRow, type GatewayTranscriptionModelId, type GatewayVideoModelId, VERSION, createGateway, createGateway as createGatewayProvider, gateway, getGatewayRealtimeAuthToken, getGatewayRealtimeProtocols, getGatewayRealtimeTeamIdOrSlug, getGatewayTranscriptionProtocols };
+7
-7
{
"name": "@ai-sdk/gateway",
"private": false,
"version": "4.0.63",
"version": "4.0.64",
"type": "module",

@@ -33,14 +33,14 @@ "license": "Apache-2.0",

"dependencies": {
"@vercel/oidc": "3.2.0",
"@ai-sdk/provider": "4.0.7",
"@ai-sdk/provider-utils": "5.0.29"
"@ai-sdk/provider": "4.0.8",
"@ai-sdk/provider-utils": "5.0.30",
"@vercel/oidc": "3.2.0"
},
"devDependencies": {
"@ai-sdk/test-server": "2.0.1",
"@types/node": "22.19.19",
"@vercel/ai-tsconfig": "0.0.0",
"tsup": "^8.5.1",
"tsx": "4.23.12",
"typescript": "5.8.3",
"zod": "3.25.76",
"@ai-sdk/test-server": "2.0.1",
"@vercel/ai-tsconfig": "0.0.0"
"zod": "3.25.76"
},

@@ -47,0 +47,0 @@ "peerDependencies": {

@@ -66,2 +66,3 @@ import {

abortSignal,
webhookUrl,
}: BatchV4StartOptions<LanguageModelV4BatchRequest>): Promise<BatchV4StartResult> {

@@ -88,2 +89,3 @@ const resolvedHeaders = this.config.headers

body: {
...(webhookUrl != null && { callbackUrl: webhookUrl }),
modelId: this.modelId,

@@ -90,0 +92,0 @@ requests: requests.map(request => ({

@@ -45,2 +45,6 @@ export type { GatewayEmbeddingModelId } from './gateway-embedding-model-settings';

export type {
GatewayAsyncJobMetadata,
GatewayProviderMetadata,
} from './gateway-provider-metadata';
export type {
GatewayProviderOptions,

@@ -47,0 +51,0 @@ /** @deprecated Use `GatewayProviderOptions` instead. */

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

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

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

Sorry, the diff of this file is not supported yet