@modelrelay/sdk 1.36.0 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-DWUVls-S.d.cts +4762 -0
- package/dist/api-DWUVls-S.d.ts +4762 -0
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/{chunk-EMQKOEF3.js → chunk-BP5HUQ4M.js} +8 -10
- package/dist/{chunk-CV3DTA6P.js → chunk-CXJZB6MA.js} +1 -1
- package/dist/{chunk-ADQ74R7T.js → chunk-SXNP5Y5L.js} +1 -1
- package/dist/chunk-VOFLESGQ.js +1194 -0
- package/dist/index.cjs +94 -1
- package/dist/index.d.cts +108 -4
- package/dist/index.d.ts +108 -4
- package/dist/index.js +92 -1
- package/dist/node.cjs +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/{tools-DAqAFZ8F.d.ts → tools-B7444ZtV.d.cts} +13 -11
- package/dist/{tools-DAqAFZ8F.d.cts → tools-B7444ZtV.d.ts} +13 -11
- package/package.json +1 -1
|
@@ -268,14 +268,14 @@ interface FrontendToken {
|
|
|
268
268
|
sessionId: string;
|
|
269
269
|
/** The project ID this token is scoped to. */
|
|
270
270
|
projectId: string;
|
|
271
|
-
/** The internal customer ID (UUID). */
|
|
272
|
-
customerId
|
|
271
|
+
/** The internal customer ID (UUID). Only present for managed billing projects; BYOB projects have end-users but not customers. */
|
|
272
|
+
customerId?: string;
|
|
273
273
|
/** The external customer ID provided by the application. */
|
|
274
274
|
customerExternalId: string;
|
|
275
275
|
/** The tier code for the customer (e.g., "free", "pro", "enterprise").
|
|
276
276
|
* Optional for BYOB (external billing) projects where customers may not have subscriptions.
|
|
277
277
|
*/
|
|
278
|
-
tierCode?:
|
|
278
|
+
tierCode?: TierCode;
|
|
279
279
|
/**
|
|
280
280
|
* Publishable key used for issuance. Added client-side for caching.
|
|
281
281
|
*/
|
|
@@ -304,10 +304,11 @@ interface CustomerToken {
|
|
|
304
304
|
expiresIn: number;
|
|
305
305
|
tokenType: TokenType;
|
|
306
306
|
projectId: string;
|
|
307
|
-
|
|
307
|
+
/** Only present for managed billing projects; BYOB projects have end-users but not customers. */
|
|
308
|
+
customerId?: string;
|
|
308
309
|
customerExternalId: string;
|
|
309
310
|
/** Optional for BYOB (external billing) projects */
|
|
310
|
-
tierCode?:
|
|
311
|
+
tierCode?: TierCode;
|
|
311
312
|
}
|
|
312
313
|
interface OIDCExchangeRequest {
|
|
313
314
|
idToken: string;
|
|
@@ -355,12 +356,12 @@ interface DeviceTokenResponse {
|
|
|
355
356
|
tokenType: TokenType;
|
|
356
357
|
/** The project ID this token is scoped to */
|
|
357
358
|
projectId: string;
|
|
358
|
-
/** The internal customer ID (UUID) */
|
|
359
|
-
customerId
|
|
359
|
+
/** The internal customer ID (UUID). Only present for managed billing projects; BYOB projects have end-users but not customers. */
|
|
360
|
+
customerId?: string;
|
|
360
361
|
/** The external customer ID */
|
|
361
362
|
customerExternalId: string;
|
|
362
363
|
/** The tier code for the customer (optional for BYOB projects) */
|
|
363
|
-
tierCode?:
|
|
364
|
+
tierCode?: TierCode;
|
|
364
365
|
}
|
|
365
366
|
/**
|
|
366
367
|
* Pending response from polling device token endpoint.
|
|
@@ -704,9 +705,10 @@ interface APIFrontendToken {
|
|
|
704
705
|
key_id: string;
|
|
705
706
|
session_id: string;
|
|
706
707
|
project_id: string;
|
|
707
|
-
|
|
708
|
+
/** Optional for BYOB projects where customers are not created in the billing sense. */
|
|
709
|
+
customer_id?: string;
|
|
708
710
|
customer_external_id: string;
|
|
709
|
-
tier_code?:
|
|
711
|
+
tier_code?: TierCode;
|
|
710
712
|
}
|
|
711
713
|
interface APICustomerRef {
|
|
712
714
|
id: string;
|
|
@@ -1169,4 +1171,4 @@ interface RetryOptions {
|
|
|
1169
1171
|
*/
|
|
1170
1172
|
declare function executeWithRetry(registry: ToolRegistry, toolCalls: ToolCall[], options?: RetryOptions): Promise<ToolExecutionResult[]>;
|
|
1171
1173
|
|
|
1172
|
-
export {
|
|
1174
|
+
export { ToolCallAccumulator as $, type ApiKey as A, createFunctionToolFromSchema as B, type CustomerTokenRequest as C, type DeviceStartRequest as D, createWebTool as E, type FrontendCustomer as F, toolChoiceAuto as G, toolChoiceRequired as H, type InputItem as I, toolChoiceNone as J, hasToolCalls as K, firstToolCall as L, type MetricsCallbacks as M, createUserMessage as N, type OIDCExchangeRequest as O, type ProviderId as P, createAssistantMessage as Q, type RetryConfig as R, type StructuredJSONEvent as S, type TraceCallbacks as T, createSystemMessage as U, toolResultMessage as V, respondToToolCall as W, assistantMessageWithToolCalls as X, createToolCall as Y, type ZodLikeSchema as Z, createFunctionCall as _, type RequestContext as a, type OutputFormatType as a$, zodToJsonSchema as a0, parseToolArgs as a1, tryParseToolArgs as a2, parseToolArgsRaw as a3, ToolArgsError as a4, formatToolErrorForModel as a5, hasRetryableErrors as a6, getRetryableErrors as a7, createRetryMessages as a8, executeWithRetry as a9, type Usage as aA, createUsage as aB, type UsageSummary as aC, type Project as aD, MessageRoles as aE, type MessageRole as aF, ContentPartTypes as aG, type ContentPartType as aH, type ContentPart as aI, InputItemTypes as aJ, type InputItemType as aK, OutputItemTypes as aL, type OutputItemType as aM, type OutputItem as aN, ToolTypes as aO, type ToolType as aP, WebToolIntents as aQ, type WebToolIntent as aR, type FunctionTool as aS, type WebSearchConfig as aT, type XSearchConfig as aU, type CodeExecConfig as aV, ToolChoiceTypes as aW, type ToolChoiceType as aX, type FunctionCall as aY, type ToolCall as aZ, OutputFormatTypes as a_, type JsonSchemaOptions as aa, type Schema as ab, type ToolHandler as ac, type RetryOptions as ad, SDK_VERSION as ae, DEFAULT_CLIENT_HEADER as af, DEFAULT_CONNECT_TIMEOUT_MS as ag, DEFAULT_REQUEST_TIMEOUT_MS as ah, type NonEmptyArray as ai, StopReasons as aj, type KnownStopReason as ak, type StopReason as al, asProviderId as am, asModelId as an, asTierCode as ao, SubscriptionStatuses as ap, type SubscriptionStatusKind as aq, BillingProviders as ar, type BillingProvider as as, type CustomerMetadata as at, type ModelRelayBaseOptions as au, type ModelRelayTokenOptions as av, type ModelRelayTokenProviderOptions as aw, type TokenType as ax, type DeviceTokenResponse as ay, type DeviceTokenPending as az, type TokenProvider as b, type JSONSchemaFormat as b0, type Citation as b1, type HttpRequestMetrics as b2, type StreamFirstTokenMetrics as b3, type TokenUsageMetrics as b4, mergeMetrics as b5, mergeTrace as b6, normalizeStopReason as b7, stopReasonToString as b8, normalizeModelId as b9, modelToString as ba, type ResponseEventType as bb, type MessageStartData as bc, type MessageDeltaData as bd, type MessageStopData as be, type ToolCallDelta as bf, type FunctionCallDelta as bg, type StructuredJSONRecordType as bh, type DeepPartial as bi, type APIFrontendToken as bj, type APICustomerRef as bk, type APICheckoutSession as bl, type APIUsage as bm, type APIResponsesResponse as bn, type APIKey as bo, type FrontendTokenRequest as c, type FrontendToken as d, type FrontendTokenAutoProvisionRequest as e, type CustomerToken as f, type DeviceStartResponse as g, type DeviceTokenResult as h, type ModelId as i, type OutputFormat as j, type Tool as k, type ToolChoice as l, type ResponseEvent as m, type Response as n, type FieldError as o, type RetryMetadata as p, type TransportErrorKind as q, ToolRegistry as r, type ToolExecutionResult as s, type TierCode as t, type PublishableKey as u, type SecretKey as v, type ModelRelayKeyOptions as w, type ModelRelayOptions as x, DEFAULT_BASE_URL as y, createFunctionTool as z };
|
|
@@ -268,14 +268,14 @@ interface FrontendToken {
|
|
|
268
268
|
sessionId: string;
|
|
269
269
|
/** The project ID this token is scoped to. */
|
|
270
270
|
projectId: string;
|
|
271
|
-
/** The internal customer ID (UUID). */
|
|
272
|
-
customerId
|
|
271
|
+
/** The internal customer ID (UUID). Only present for managed billing projects; BYOB projects have end-users but not customers. */
|
|
272
|
+
customerId?: string;
|
|
273
273
|
/** The external customer ID provided by the application. */
|
|
274
274
|
customerExternalId: string;
|
|
275
275
|
/** The tier code for the customer (e.g., "free", "pro", "enterprise").
|
|
276
276
|
* Optional for BYOB (external billing) projects where customers may not have subscriptions.
|
|
277
277
|
*/
|
|
278
|
-
tierCode?:
|
|
278
|
+
tierCode?: TierCode;
|
|
279
279
|
/**
|
|
280
280
|
* Publishable key used for issuance. Added client-side for caching.
|
|
281
281
|
*/
|
|
@@ -304,10 +304,11 @@ interface CustomerToken {
|
|
|
304
304
|
expiresIn: number;
|
|
305
305
|
tokenType: TokenType;
|
|
306
306
|
projectId: string;
|
|
307
|
-
|
|
307
|
+
/** Only present for managed billing projects; BYOB projects have end-users but not customers. */
|
|
308
|
+
customerId?: string;
|
|
308
309
|
customerExternalId: string;
|
|
309
310
|
/** Optional for BYOB (external billing) projects */
|
|
310
|
-
tierCode?:
|
|
311
|
+
tierCode?: TierCode;
|
|
311
312
|
}
|
|
312
313
|
interface OIDCExchangeRequest {
|
|
313
314
|
idToken: string;
|
|
@@ -355,12 +356,12 @@ interface DeviceTokenResponse {
|
|
|
355
356
|
tokenType: TokenType;
|
|
356
357
|
/** The project ID this token is scoped to */
|
|
357
358
|
projectId: string;
|
|
358
|
-
/** The internal customer ID (UUID) */
|
|
359
|
-
customerId
|
|
359
|
+
/** The internal customer ID (UUID). Only present for managed billing projects; BYOB projects have end-users but not customers. */
|
|
360
|
+
customerId?: string;
|
|
360
361
|
/** The external customer ID */
|
|
361
362
|
customerExternalId: string;
|
|
362
363
|
/** The tier code for the customer (optional for BYOB projects) */
|
|
363
|
-
tierCode?:
|
|
364
|
+
tierCode?: TierCode;
|
|
364
365
|
}
|
|
365
366
|
/**
|
|
366
367
|
* Pending response from polling device token endpoint.
|
|
@@ -704,9 +705,10 @@ interface APIFrontendToken {
|
|
|
704
705
|
key_id: string;
|
|
705
706
|
session_id: string;
|
|
706
707
|
project_id: string;
|
|
707
|
-
|
|
708
|
+
/** Optional for BYOB projects where customers are not created in the billing sense. */
|
|
709
|
+
customer_id?: string;
|
|
708
710
|
customer_external_id: string;
|
|
709
|
-
tier_code?:
|
|
711
|
+
tier_code?: TierCode;
|
|
710
712
|
}
|
|
711
713
|
interface APICustomerRef {
|
|
712
714
|
id: string;
|
|
@@ -1169,4 +1171,4 @@ interface RetryOptions {
|
|
|
1169
1171
|
*/
|
|
1170
1172
|
declare function executeWithRetry(registry: ToolRegistry, toolCalls: ToolCall[], options?: RetryOptions): Promise<ToolExecutionResult[]>;
|
|
1171
1173
|
|
|
1172
|
-
export {
|
|
1174
|
+
export { ToolCallAccumulator as $, type ApiKey as A, createFunctionToolFromSchema as B, type CustomerTokenRequest as C, type DeviceStartRequest as D, createWebTool as E, type FrontendCustomer as F, toolChoiceAuto as G, toolChoiceRequired as H, type InputItem as I, toolChoiceNone as J, hasToolCalls as K, firstToolCall as L, type MetricsCallbacks as M, createUserMessage as N, type OIDCExchangeRequest as O, type ProviderId as P, createAssistantMessage as Q, type RetryConfig as R, type StructuredJSONEvent as S, type TraceCallbacks as T, createSystemMessage as U, toolResultMessage as V, respondToToolCall as W, assistantMessageWithToolCalls as X, createToolCall as Y, type ZodLikeSchema as Z, createFunctionCall as _, type RequestContext as a, type OutputFormatType as a$, zodToJsonSchema as a0, parseToolArgs as a1, tryParseToolArgs as a2, parseToolArgsRaw as a3, ToolArgsError as a4, formatToolErrorForModel as a5, hasRetryableErrors as a6, getRetryableErrors as a7, createRetryMessages as a8, executeWithRetry as a9, type Usage as aA, createUsage as aB, type UsageSummary as aC, type Project as aD, MessageRoles as aE, type MessageRole as aF, ContentPartTypes as aG, type ContentPartType as aH, type ContentPart as aI, InputItemTypes as aJ, type InputItemType as aK, OutputItemTypes as aL, type OutputItemType as aM, type OutputItem as aN, ToolTypes as aO, type ToolType as aP, WebToolIntents as aQ, type WebToolIntent as aR, type FunctionTool as aS, type WebSearchConfig as aT, type XSearchConfig as aU, type CodeExecConfig as aV, ToolChoiceTypes as aW, type ToolChoiceType as aX, type FunctionCall as aY, type ToolCall as aZ, OutputFormatTypes as a_, type JsonSchemaOptions as aa, type Schema as ab, type ToolHandler as ac, type RetryOptions as ad, SDK_VERSION as ae, DEFAULT_CLIENT_HEADER as af, DEFAULT_CONNECT_TIMEOUT_MS as ag, DEFAULT_REQUEST_TIMEOUT_MS as ah, type NonEmptyArray as ai, StopReasons as aj, type KnownStopReason as ak, type StopReason as al, asProviderId as am, asModelId as an, asTierCode as ao, SubscriptionStatuses as ap, type SubscriptionStatusKind as aq, BillingProviders as ar, type BillingProvider as as, type CustomerMetadata as at, type ModelRelayBaseOptions as au, type ModelRelayTokenOptions as av, type ModelRelayTokenProviderOptions as aw, type TokenType as ax, type DeviceTokenResponse as ay, type DeviceTokenPending as az, type TokenProvider as b, type JSONSchemaFormat as b0, type Citation as b1, type HttpRequestMetrics as b2, type StreamFirstTokenMetrics as b3, type TokenUsageMetrics as b4, mergeMetrics as b5, mergeTrace as b6, normalizeStopReason as b7, stopReasonToString as b8, normalizeModelId as b9, modelToString as ba, type ResponseEventType as bb, type MessageStartData as bc, type MessageDeltaData as bd, type MessageStopData as be, type ToolCallDelta as bf, type FunctionCallDelta as bg, type StructuredJSONRecordType as bh, type DeepPartial as bi, type APIFrontendToken as bj, type APICustomerRef as bk, type APICheckoutSession as bl, type APIUsage as bm, type APIResponsesResponse as bn, type APIKey as bo, type FrontendTokenRequest as c, type FrontendToken as d, type FrontendTokenAutoProvisionRequest as e, type CustomerToken as f, type DeviceStartResponse as g, type DeviceTokenResult as h, type ModelId as i, type OutputFormat as j, type Tool as k, type ToolChoice as l, type ResponseEvent as m, type Response as n, type FieldError as o, type RetryMetadata as p, type TransportErrorKind as q, ToolRegistry as r, type ToolExecutionResult as s, type TierCode as t, type PublishableKey as u, type SecretKey as v, type ModelRelayKeyOptions as w, type ModelRelayOptions as x, DEFAULT_BASE_URL as y, createFunctionTool as z };
|