@zuplo/cli 6.72.11 → 6.72.13
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/node_modules/@posthog/core/dist/gzip.js +1 -1
- package/node_modules/@posthog/core/dist/gzip.mjs +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.js +2 -1
- package/node_modules/@posthog/core/dist/posthog-core.mjs +2 -1
- package/node_modules/@posthog/core/dist/types.d.ts +2 -0
- package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
- package/node_modules/@posthog/core/package.json +2 -2
- package/node_modules/@posthog/core/src/gzip.ts +1 -1
- package/node_modules/@posthog/core/src/posthog-core.ts +1 -0
- package/node_modules/@posthog/core/src/types.ts +2 -0
- package/node_modules/@posthog/types/dist/feature-flags.d.ts +2 -0
- package/node_modules/@posthog/types/dist/feature-flags.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/feature-flags.ts +2 -0
- package/node_modules/@zuplo/core/customer.cli.minified.js +1 -1
- package/node_modules/@zuplo/core/index.minified.js +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-4MNJC7E2.js → chunk-32F3RZS4.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-32F3RZS4.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-K77Z5PRN.js → chunk-J6K7HSIK.js} +3 -3
- package/node_modules/@zuplo/runtime/out/esm/chunk-J6K7HSIK.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-NIKKAYJU.js → chunk-SL2TSFWP.js} +103 -103
- package/node_modules/@zuplo/runtime/out/esm/chunk-SL2TSFWP.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +225 -186
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/express-rate-limit/dist/index.cjs +69 -5
- package/node_modules/express-rate-limit/dist/index.d.cts +18 -0
- package/node_modules/express-rate-limit/dist/index.d.mts +18 -0
- package/node_modules/express-rate-limit/dist/index.d.ts +18 -0
- package/node_modules/express-rate-limit/dist/index.mjs +55 -5
- package/node_modules/express-rate-limit/package.json +11 -8
- package/node_modules/express-rate-limit/readme.md +2 -2
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-4MNJC7E2.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-K77Z5PRN.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-NIKKAYJU.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-NIKKAYJU.js.LEGAL.txt → chunk-SL2TSFWP.js.LEGAL.txt} +0 -0
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{i as a,j as l,k as c,l as o,o as p,p as y,q as m}from"../../chunk-
|
|
25
|
+
import{i as a,j as l,k as c,l as o,o as p,p as y,q as m}from"../../chunk-J6K7HSIK.js";import{a as i}from"../../chunk-DSZS6PZJ.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -143,6 +143,10 @@ export declare interface AIGatewayAuthInboundPolicyOptions {
|
|
|
143
143
|
* An AI Gateway capability that can have a resolved model selection.
|
|
144
144
|
*
|
|
145
145
|
* @public
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* const capability: AIGatewayCapability = "completions";
|
|
149
|
+
* ```
|
|
146
150
|
*/
|
|
147
151
|
export declare type AIGatewayCapability =
|
|
148
152
|
| "completions"
|
|
@@ -153,39 +157,6 @@ export declare type AIGatewayCapability =
|
|
|
153
157
|
| "audio_speech"
|
|
154
158
|
| "audio_transcriptions";
|
|
155
159
|
|
|
156
|
-
/**
|
|
157
|
-
* Primary and optional fallback routing for one AI Gateway capability.
|
|
158
|
-
*
|
|
159
|
-
* @public
|
|
160
|
-
*/
|
|
161
|
-
export declare interface AIGatewayCapabilityRouting {
|
|
162
|
-
/** The primary provider and model. */
|
|
163
|
-
model: AIGatewayModelRef;
|
|
164
|
-
/** The provider and model used after a retryable error or timeout. */
|
|
165
|
-
fallback?: AIGatewayFallbackRef;
|
|
166
|
-
/** The provider and model used after a usage-limit-exceeded signal. */
|
|
167
|
-
quotaFallback?: AIGatewayModelRef;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export declare interface AIGatewayCapabilitySelection {
|
|
171
|
-
candidates: AIGatewayModelCandidate[];
|
|
172
|
-
fallbackTimeoutSeconds?: number;
|
|
173
|
-
quotaFallback?: AIGatewayModelCandidate;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* A model used after a retryable primary-provider failure or timeout.
|
|
178
|
-
*
|
|
179
|
-
* @public
|
|
180
|
-
*/
|
|
181
|
-
export declare interface AIGatewayFallbackRef extends AIGatewayModelRef {
|
|
182
|
-
/**
|
|
183
|
-
* Bounds the primary call before failing over. Defaults to 60 seconds and is
|
|
184
|
-
* only meaningful when a fallback is configured.
|
|
185
|
-
*/
|
|
186
|
-
timeoutSeconds?: number;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
160
|
/**
|
|
190
161
|
* Handler that routes AI/LLM requests through Zuplo's LLM Translation Layer.
|
|
191
162
|
* This handler forwards requests to the translation layer that handles provider-specific
|
|
@@ -214,9 +185,9 @@ export declare function aiGatewayHandler(
|
|
|
214
185
|
|
|
215
186
|
/**
|
|
216
187
|
* Routes AI requests using the model selection stored in the request context.
|
|
217
|
-
* Attach the `ai-gateway-model-routing-v2-inbound` policy before this handler
|
|
218
|
-
*
|
|
219
|
-
*
|
|
188
|
+
* Attach the `ai-gateway-model-routing-v2-inbound` policy before this handler
|
|
189
|
+
* runs, or call `AIGatewayModelRouting.set(context, routing)` from a custom
|
|
190
|
+
* inbound policy.
|
|
220
191
|
*
|
|
221
192
|
* @beta
|
|
222
193
|
* @param request - The incoming AI Gateway request.
|
|
@@ -340,23 +311,23 @@ export declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
|
340
311
|
throwOnFailure?: boolean;
|
|
341
312
|
}
|
|
342
313
|
|
|
343
|
-
export declare interface AIGatewayModelCandidate {
|
|
344
|
-
provider: string;
|
|
345
|
-
model: string;
|
|
346
|
-
apiKey?: string;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
314
|
/**
|
|
350
|
-
* Catalog information about
|
|
351
|
-
*
|
|
352
|
-
* Model catalog membership does not indicate that the project has credentials
|
|
353
|
-
* for the model's provider. The policy resolves credentials only after the
|
|
354
|
-
* routing function returns a provider and model.
|
|
315
|
+
* Catalog information about an AI Gateway model.
|
|
355
316
|
*
|
|
356
317
|
* @public
|
|
318
|
+
* @example
|
|
319
|
+
* ```typescript
|
|
320
|
+
* const model: AIGatewayModelInfo = {
|
|
321
|
+
* model: "gpt-5",
|
|
322
|
+
* capability: "completions",
|
|
323
|
+
* status: "active",
|
|
324
|
+
* inputCostPerToken: 0.00000125,
|
|
325
|
+
* outputCostPerToken: 0.00001,
|
|
326
|
+
* };
|
|
327
|
+
* ```
|
|
357
328
|
*/
|
|
358
329
|
export declare interface AIGatewayModelInfo {
|
|
359
|
-
/** The provider-specific model identifier
|
|
330
|
+
/** The provider-specific model identifier. */
|
|
360
331
|
model: string;
|
|
361
332
|
/** The AI Gateway capability supported by the model. */
|
|
362
333
|
capability: "completions" | "embeddings";
|
|
@@ -369,59 +340,65 @@ export declare interface AIGatewayModelInfo {
|
|
|
369
340
|
}
|
|
370
341
|
|
|
371
342
|
/**
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* @public
|
|
375
|
-
*/
|
|
376
|
-
export declare interface AIGatewayModelRef {
|
|
377
|
-
/** The case-insensitive provider identifier, such as `openai`. */
|
|
378
|
-
provider: string;
|
|
379
|
-
/** The provider-specific model identifier, such as `gpt-5`. */
|
|
380
|
-
model: string;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Routing returned by an {@link AIGatewayRoutingFunction}.
|
|
343
|
+
* Sets and reads the model routing selected for an AI Gateway request.
|
|
385
344
|
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
345
|
+
* The built-in model-routing policy matches the request against its allowList
|
|
346
|
+
* of {@link AIGatewayRouteTarget} items, then `set()`s the winning target.
|
|
347
|
+
* Custom policies can call `set()` directly instead. Provider API keys are
|
|
348
|
+
* resolved internally and are never returned by `get()`.
|
|
389
349
|
*
|
|
390
350
|
* @public
|
|
351
|
+
* @example
|
|
352
|
+
* ```typescript
|
|
353
|
+
* import { AIGatewayModelRouting } from "@zuplo/runtime";
|
|
354
|
+
*
|
|
355
|
+
* await AIGatewayModelRouting.set(context, {
|
|
356
|
+
* completions: {
|
|
357
|
+
* main: "openai/gpt-5",
|
|
358
|
+
* backup: "anthropic/claude-sonnet-4-6",
|
|
359
|
+
* },
|
|
360
|
+
* });
|
|
361
|
+
* const routing = AIGatewayModelRouting.get(context);
|
|
362
|
+
* ```
|
|
391
363
|
*/
|
|
392
|
-
export declare
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
embeddings?: AIGatewayCapabilityRouting;
|
|
397
|
-
}
|
|
364
|
+
export declare const AIGatewayModelRouting: {
|
|
365
|
+
set(context: ZuploContext, routing: AIGatewayRouting): Promise<void>;
|
|
366
|
+
get(context: ZuploContext): AIGatewayRouting | undefined;
|
|
367
|
+
};
|
|
398
368
|
|
|
399
369
|
/**
|
|
400
|
-
*
|
|
370
|
+
* Matches AI Gateway requests against curated allow lists or open block lists,
|
|
371
|
+
* then stores the winning {@link AIGatewayRouteTarget} for the route handler.
|
|
401
372
|
*
|
|
402
373
|
* @title AI Gateway Model Routing (v2)
|
|
403
374
|
* @beta
|
|
404
375
|
* @product ai-gateway
|
|
405
|
-
* @hidden
|
|
406
376
|
* @requiresAI
|
|
407
377
|
* @param request - The ZuploRequest
|
|
408
378
|
* @param context - The ZuploContext
|
|
409
379
|
* @param options - The policy options set in policies.json
|
|
410
380
|
* @param policyName - The name of the policy as set in policies.json
|
|
411
|
-
* @returns The request with
|
|
381
|
+
* @returns The request with model routing stored in context, or a 4xx response
|
|
382
|
+
* @example
|
|
383
|
+
* ```json
|
|
384
|
+
* {
|
|
385
|
+
* "models": {
|
|
386
|
+
* "completions": {
|
|
387
|
+
* "allowList": [
|
|
388
|
+
* "openai/gpt-5",
|
|
389
|
+
* {
|
|
390
|
+
* "main": "anthropic/claude-sonnet-4-6",
|
|
391
|
+
* "backup": "openai/gpt-5-mini"
|
|
392
|
+
* }
|
|
393
|
+
* ]
|
|
394
|
+
* }
|
|
395
|
+
* }
|
|
396
|
+
* }
|
|
397
|
+
* ```
|
|
412
398
|
*/
|
|
413
399
|
export declare class AIGatewayModelRoutingV2InboundPolicy extends InboundPolicy<AIGatewayModelRoutingV2InboundPolicyOptions> {
|
|
414
400
|
#private;
|
|
415
401
|
static readonly policyType = "ai-gateway-model-routing-v2";
|
|
416
|
-
/* Excluded from this release type: setModelSelection */
|
|
417
|
-
/** Get the model selection for the current request. */
|
|
418
|
-
static getModelSelection(
|
|
419
|
-
context: ZuploContext
|
|
420
|
-
): AIGatewayModelSelection | undefined;
|
|
421
|
-
/** Get the provider catalog loaded for the current request. */
|
|
422
|
-
static getProviders(
|
|
423
|
-
context: ZuploContext
|
|
424
|
-
): AIGatewayProviderInfo[] | undefined;
|
|
425
402
|
constructor(
|
|
426
403
|
options: AIGatewayModelRoutingV2InboundPolicyOptions,
|
|
427
404
|
policyName: string
|
|
@@ -433,23 +410,31 @@ export declare class AIGatewayModelRoutingV2InboundPolicy extends InboundPolicy<
|
|
|
433
410
|
}
|
|
434
411
|
|
|
435
412
|
/**
|
|
436
|
-
* Options for
|
|
413
|
+
* Options for allowing or blocking provider/model routes for each AI Gateway capability.
|
|
437
414
|
* @public
|
|
438
415
|
*/
|
|
439
|
-
export declare
|
|
440
|
-
|
|
441
|
-
} & {
|
|
442
|
-
completions?: CompletionsRouting;
|
|
443
|
-
routingFunction?: RoutingFunction;
|
|
444
|
-
embeddings?: EmbeddingsRouting;
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
export declare interface AIGatewayModelSelection {
|
|
448
|
-
byCapability: Partial<
|
|
449
|
-
Record<AIGatewayCapability, AIGatewayCapabilitySelection>
|
|
450
|
-
>;
|
|
416
|
+
export declare interface AIGatewayModelRoutingV2InboundPolicyOptions {
|
|
417
|
+
models: Models;
|
|
451
418
|
}
|
|
452
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Accesses the live AI Gateway provider and model catalog.
|
|
422
|
+
*
|
|
423
|
+
* Results use the existing 60-second catalog cache. Credentials and the names
|
|
424
|
+
* of their environment-variable bindings are never returned.
|
|
425
|
+
*
|
|
426
|
+
* @public
|
|
427
|
+
* @example
|
|
428
|
+
* ```typescript
|
|
429
|
+
* import { AIGatewayModels } from "@zuplo/runtime";
|
|
430
|
+
*
|
|
431
|
+
* const providers = await AIGatewayModels.load(context);
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
export declare const AIGatewayModels: {
|
|
435
|
+
load(context: ZuploContext): Promise<AIGatewayProviderInfo[]>;
|
|
436
|
+
};
|
|
437
|
+
|
|
453
438
|
/**
|
|
454
439
|
* Converts OpenAI Chat Completions format responses back to Anthropic Messages format.
|
|
455
440
|
* This policy translates the response when the original request was in Anthropic format.
|
|
@@ -473,14 +458,18 @@ export declare const AIGatewayOpenAIToAnthropicOutboundPolicy: OutboundPolicyHan
|
|
|
473
458
|
export declare interface AIGatewayOpenAIToAnthropicOutboundPolicyOptions {}
|
|
474
459
|
|
|
475
460
|
/**
|
|
476
|
-
*
|
|
461
|
+
* Public metadata for an AI Gateway provider and its models.
|
|
477
462
|
*
|
|
478
|
-
* Credentials and environment-variable names are never exposed
|
|
479
|
-
* code. A provider can appear in this catalog without a key configured for the
|
|
480
|
-
* project, so routing functions should restrict candidates to providers that
|
|
481
|
-
* the project is configured to use.
|
|
463
|
+
* Credentials and environment-variable names are never exposed.
|
|
482
464
|
*
|
|
483
465
|
* @public
|
|
466
|
+
* @example
|
|
467
|
+
* ```typescript
|
|
468
|
+
* const providers = await AIGatewayModels.load(context);
|
|
469
|
+
* const activeOpenAIModels = providers
|
|
470
|
+
* .find((provider) => provider.name === "openai")
|
|
471
|
+
* ?.models.filter((model) => model.status === "active");
|
|
472
|
+
* ```
|
|
484
473
|
*/
|
|
485
474
|
export declare interface AIGatewayProviderInfo {
|
|
486
475
|
/** The case-insensitive provider identifier used in model routing. */
|
|
@@ -496,51 +485,54 @@ export declare interface AIGatewayProviderInfo {
|
|
|
496
485
|
}
|
|
497
486
|
|
|
498
487
|
/**
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
* used by later policies or the route handler.
|
|
488
|
+
* A single AI Gateway routing target.
|
|
489
|
+
*
|
|
490
|
+
* Model references use `"provider/model"`; the string form is shorthand for
|
|
491
|
+
* `{ main: "provider/model" }`. The built-in model-routing policy uses this
|
|
492
|
+
* same type for each allow-list item: it matches the request against its
|
|
493
|
+
* allowList and `set()`s the winning target.
|
|
506
494
|
*
|
|
507
|
-
* @param request - An isolated clone of the incoming gateway request.
|
|
508
|
-
* @param context - The current Zuplo request context.
|
|
509
|
-
* @param options - Static defaults, the live provider catalog, and policy name.
|
|
510
|
-
* @returns Per-request model routing, or undefined to keep the static defaults.
|
|
511
495
|
* @public
|
|
496
|
+
* @example
|
|
497
|
+
* ```typescript
|
|
498
|
+
* const target: AIGatewayRouteTarget = {
|
|
499
|
+
* main: "openai/gpt-5",
|
|
500
|
+
* backup: "anthropic/claude-sonnet-4-6",
|
|
501
|
+
* fallbackTimeoutSeconds: 30,
|
|
502
|
+
* quotaFallback: "openai/gpt-5-mini",
|
|
503
|
+
* };
|
|
504
|
+
* ```
|
|
512
505
|
*/
|
|
513
|
-
export declare type
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
506
|
+
export declare type AIGatewayRouteTarget =
|
|
507
|
+
| string
|
|
508
|
+
| {
|
|
509
|
+
main: string;
|
|
510
|
+
backup?: string;
|
|
511
|
+
fallbackTimeoutSeconds?: number;
|
|
512
|
+
quotaFallback?: string;
|
|
513
|
+
};
|
|
521
514
|
|
|
522
515
|
/**
|
|
523
|
-
*
|
|
516
|
+
* The model routing selected for the current AI Gateway request.
|
|
517
|
+
*
|
|
518
|
+
* Each capability accepts the same {@link AIGatewayRouteTarget} used by an
|
|
519
|
+
* allow-list item in the built-in policy. The policy matches its allowList and
|
|
520
|
+
* `set()`s the one winning target for the request.
|
|
524
521
|
*
|
|
525
522
|
* @public
|
|
523
|
+
* @example
|
|
524
|
+
* ```typescript
|
|
525
|
+
* const routing: AIGatewayRouting = {
|
|
526
|
+
* completions: "openai/gpt-5",
|
|
527
|
+
* embeddings: { main: "openai/text-embedding-3-small" },
|
|
528
|
+
* };
|
|
529
|
+
* ```
|
|
526
530
|
*/
|
|
527
|
-
export declare interface
|
|
528
|
-
/**
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
defaultRouting: AIGatewayModelRouting | undefined;
|
|
533
|
-
/**
|
|
534
|
-
* The live provider catalog, including model pricing and lifecycle status.
|
|
535
|
-
* Catalog membership does not guarantee that the project has credentials for
|
|
536
|
-
* a provider. Credentials and their environment-variable names are not
|
|
537
|
-
* exposed to the routing function.
|
|
538
|
-
*/
|
|
539
|
-
providers: AIGatewayProviderInfo[];
|
|
540
|
-
/**
|
|
541
|
-
* The name of the model-routing policy as set in policies.json.
|
|
542
|
-
*/
|
|
543
|
-
policyName: string;
|
|
531
|
+
export declare interface AIGatewayRouting {
|
|
532
|
+
/** Routing for chat completions, Responses, and Anthropic Messages. */
|
|
533
|
+
completions?: AIGatewayRouteTarget;
|
|
534
|
+
/** Routing for embedding requests. */
|
|
535
|
+
embeddings?: AIGatewayRouteTarget;
|
|
544
536
|
}
|
|
545
537
|
|
|
546
538
|
/**
|
|
@@ -1056,6 +1048,14 @@ export declare interface AkamaiFirewallForAiOutboundPolicyOptions {
|
|
|
1056
1048
|
detectUrl?: string;
|
|
1057
1049
|
}
|
|
1058
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
* Curated targets clients may select; the first entry is the default when model is omitted.
|
|
1053
|
+
*
|
|
1054
|
+
* @minItems 1
|
|
1055
|
+
* @public
|
|
1056
|
+
*/
|
|
1057
|
+
declare type AllowedModels = [RouteTarget, ...RouteTarget[]];
|
|
1058
|
+
|
|
1059
1059
|
/**
|
|
1060
1060
|
* Amberflo is a usage metering and billing service. This policy allows
|
|
1061
1061
|
* you to send metering calls for each API to their meter ingest endpoint.
|
|
@@ -2544,6 +2544,14 @@ declare interface BatchDispatcherOptions {
|
|
|
2544
2544
|
name?: string;
|
|
2545
2545
|
}
|
|
2546
2546
|
|
|
2547
|
+
/**
|
|
2548
|
+
* Configured provider/model targets rejected in open-but-filtered mode; requests may use a bare model name or provider/model.
|
|
2549
|
+
*
|
|
2550
|
+
* @minItems 1
|
|
2551
|
+
* @public
|
|
2552
|
+
*/
|
|
2553
|
+
declare type BlockedModels = [ProviderAndModel, ...ProviderAndModel[]];
|
|
2554
|
+
|
|
2547
2555
|
/**
|
|
2548
2556
|
* The brownout policy allows performing scheduled downtime on your API
|
|
2549
2557
|
*
|
|
@@ -2714,6 +2722,14 @@ export declare interface CachingInboundPolicyOptions {
|
|
|
2714
2722
|
dangerouslyIgnoreAuthorizationHeader?: boolean;
|
|
2715
2723
|
}
|
|
2716
2724
|
|
|
2725
|
+
/**
|
|
2726
|
+
* Choose curated allow-list mode or open-but-filtered block-list mode.
|
|
2727
|
+
* @public
|
|
2728
|
+
*/
|
|
2729
|
+
declare type CapabilityModelRules =
|
|
2730
|
+
| CuratedModelRules
|
|
2731
|
+
| OpenButFilteredModelRules;
|
|
2732
|
+
|
|
2717
2733
|
/**
|
|
2718
2734
|
* Controls which parts of the incoming request are sent to Akamai for inspection. Akamai's detect endpoint receives the captured fields concatenated into a single labeled text payload as `llmInput`.
|
|
2719
2735
|
* @public
|
|
@@ -3273,27 +3289,10 @@ declare interface CompatibilityFlags {
|
|
|
3273
3289
|
}
|
|
3274
3290
|
|
|
3275
3291
|
/**
|
|
3276
|
-
*
|
|
3292
|
+
* Rules for chat completions, Responses, and Anthropic Messages requests.
|
|
3277
3293
|
* @public
|
|
3278
3294
|
*/
|
|
3279
|
-
declare
|
|
3280
|
-
model: {
|
|
3281
|
-
provider: string;
|
|
3282
|
-
model: string;
|
|
3283
|
-
};
|
|
3284
|
-
fallback?: {
|
|
3285
|
-
provider: string;
|
|
3286
|
-
model: string;
|
|
3287
|
-
/**
|
|
3288
|
-
* How long the primary model may take before the fallback is attempted.
|
|
3289
|
-
*/
|
|
3290
|
-
timeoutSeconds?: number;
|
|
3291
|
-
};
|
|
3292
|
-
quotaFallback?: {
|
|
3293
|
-
provider: string;
|
|
3294
|
-
model: string;
|
|
3295
|
-
};
|
|
3296
|
-
}
|
|
3295
|
+
declare type CompletionsModels = CapabilityModelRules;
|
|
3297
3296
|
|
|
3298
3297
|
/**
|
|
3299
3298
|
* @public
|
|
@@ -3718,6 +3717,14 @@ export declare class CryptoBeta extends BaseCryptoBeta {
|
|
|
3718
3717
|
digest(algorithm: string, data: string): Promise<string>;
|
|
3719
3718
|
}
|
|
3720
3719
|
|
|
3720
|
+
/**
|
|
3721
|
+
* Allow only listed targets and use entry zero as the default.
|
|
3722
|
+
* @public
|
|
3723
|
+
*/
|
|
3724
|
+
declare interface CuratedModelRules {
|
|
3725
|
+
allowList: AllowedModels;
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3721
3728
|
/**
|
|
3722
3729
|
* Authenticate users using the Curity Phantom Token Pattern.
|
|
3723
3730
|
*
|
|
@@ -4229,27 +4236,10 @@ export declare class DynatraceMetricsPlugin extends MetricsPlugin {
|
|
|
4229
4236
|
}
|
|
4230
4237
|
|
|
4231
4238
|
/**
|
|
4232
|
-
*
|
|
4239
|
+
* Rules for embedding requests.
|
|
4233
4240
|
* @public
|
|
4234
4241
|
*/
|
|
4235
|
-
declare
|
|
4236
|
-
model: {
|
|
4237
|
-
provider: string;
|
|
4238
|
-
model: string;
|
|
4239
|
-
};
|
|
4240
|
-
fallback?: {
|
|
4241
|
-
provider: string;
|
|
4242
|
-
model: string;
|
|
4243
|
-
/**
|
|
4244
|
-
* How long the primary model may take before the fallback is attempted.
|
|
4245
|
-
*/
|
|
4246
|
-
timeoutSeconds?: number;
|
|
4247
|
-
};
|
|
4248
|
-
quotaFallback?: {
|
|
4249
|
-
provider: string;
|
|
4250
|
-
model: string;
|
|
4251
|
-
};
|
|
4252
|
-
}
|
|
4242
|
+
declare type EmbeddingsModels = CapabilityModelRules;
|
|
4253
4243
|
|
|
4254
4244
|
/**
|
|
4255
4245
|
* Enable accumulation and validation of streaming responses.
|
|
@@ -4376,6 +4366,12 @@ export declare function extractStreamTextDelta(
|
|
|
4376
4366
|
format: AiFormat
|
|
4377
4367
|
): string | undefined;
|
|
4378
4368
|
|
|
4369
|
+
/**
|
|
4370
|
+
* How long the main model may take before the backup is attempted.
|
|
4371
|
+
* @public
|
|
4372
|
+
*/
|
|
4373
|
+
declare type FallbackTimeoutSeconds = number;
|
|
4374
|
+
|
|
4379
4375
|
declare interface FetchOptions<T> {
|
|
4380
4376
|
method?: HttpMethod_2;
|
|
4381
4377
|
data?: T;
|
|
@@ -9925,6 +9921,26 @@ declare interface ModelConfiguration {
|
|
|
9925
9921
|
provider: string;
|
|
9926
9922
|
}
|
|
9927
9923
|
|
|
9924
|
+
/**
|
|
9925
|
+
* A primary model and optional failure or quota fallbacks.
|
|
9926
|
+
* @public
|
|
9927
|
+
*/
|
|
9928
|
+
declare interface ModelRouteTarget {
|
|
9929
|
+
main: ProviderAndModel1;
|
|
9930
|
+
backup?: ProviderAndModel2;
|
|
9931
|
+
fallbackTimeoutSeconds?: FallbackTimeoutSeconds;
|
|
9932
|
+
quotaFallback?: ProviderAndModel3;
|
|
9933
|
+
}
|
|
9934
|
+
|
|
9935
|
+
/**
|
|
9936
|
+
* Declarative model-routing rules, grouped by AI Gateway capability.
|
|
9937
|
+
* @public
|
|
9938
|
+
*/
|
|
9939
|
+
declare interface Models {
|
|
9940
|
+
completions?: CompletionsModels;
|
|
9941
|
+
embeddings?: EmbeddingsModels;
|
|
9942
|
+
}
|
|
9943
|
+
|
|
9928
9944
|
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
9929
9945
|
|
|
9930
9946
|
declare interface MoesifContext {
|
|
@@ -11072,6 +11088,14 @@ declare namespace OpenAPIV3_1 {
|
|
|
11072
11088
|
}
|
|
11073
11089
|
}
|
|
11074
11090
|
|
|
11091
|
+
/**
|
|
11092
|
+
* Allow any requested target except those explicitly blocked.
|
|
11093
|
+
* @public
|
|
11094
|
+
*/
|
|
11095
|
+
declare interface OpenButFilteredModelRules {
|
|
11096
|
+
blockList: BlockedModels;
|
|
11097
|
+
}
|
|
11098
|
+
|
|
11075
11099
|
/**
|
|
11076
11100
|
* Authorize requests using OpenFGA.
|
|
11077
11101
|
*
|
|
@@ -11788,6 +11812,30 @@ export declare interface PropelAuthJwtInboundPolicyOptions {
|
|
|
11788
11812
|
oAuthResourceMetadataEnabled?: boolean;
|
|
11789
11813
|
}
|
|
11790
11814
|
|
|
11815
|
+
/**
|
|
11816
|
+
* A model reference in provider/model form, split on the first slash.
|
|
11817
|
+
* @public
|
|
11818
|
+
*/
|
|
11819
|
+
declare type ProviderAndModel = string;
|
|
11820
|
+
|
|
11821
|
+
/**
|
|
11822
|
+
* A model reference in provider/model form, split on the first slash.
|
|
11823
|
+
* @public
|
|
11824
|
+
*/
|
|
11825
|
+
declare type ProviderAndModel1 = string;
|
|
11826
|
+
|
|
11827
|
+
/**
|
|
11828
|
+
* A model reference in provider/model form, split on the first slash.
|
|
11829
|
+
* @public
|
|
11830
|
+
*/
|
|
11831
|
+
declare type ProviderAndModel2 = string;
|
|
11832
|
+
|
|
11833
|
+
/**
|
|
11834
|
+
* A model reference in provider/model form, split on the first slash.
|
|
11835
|
+
* @public
|
|
11836
|
+
*/
|
|
11837
|
+
declare type ProviderAndModel3 = string;
|
|
11838
|
+
|
|
11791
11839
|
/**
|
|
11792
11840
|
* Extracts a query parameter and sets it as a header in the request.
|
|
11793
11841
|
*
|
|
@@ -13606,19 +13654,10 @@ export declare interface RouteHandler<T = unknown> {
|
|
|
13606
13654
|
/* Excluded from this release type: Router */
|
|
13607
13655
|
|
|
13608
13656
|
/**
|
|
13609
|
-
*
|
|
13657
|
+
* A provider/model string shorthand or a full model route target.
|
|
13610
13658
|
* @public
|
|
13611
13659
|
*/
|
|
13612
|
-
declare
|
|
13613
|
-
/**
|
|
13614
|
-
* Module to load the routing function from, e.g. $import(./modules/model-routing).
|
|
13615
|
-
*/
|
|
13616
|
-
module: string;
|
|
13617
|
-
/**
|
|
13618
|
-
* Named export of the routing function, e.g. 'default' or 'routeModels'.
|
|
13619
|
-
*/
|
|
13620
|
-
export: string;
|
|
13621
|
-
}
|
|
13660
|
+
declare type RouteTarget = ProviderAndModel | ModelRouteTarget;
|
|
13622
13661
|
|
|
13623
13662
|
/**
|
|
13624
13663
|
* The authorization rule evaluated against the authenticated user's claims (request.user.data, populated by the authentication policy that runs before this one — a JWT policy, API key auth, mTLS, etc.). A rule is either a single claim check (eq, in, or startsWith) or an and/or combination of nested rules. Combinators may nest up to three levels deep. Requests that fail the rule receive a 403 Forbidden response.
|