@copilotkit/aimock 1.30.0 → 1.32.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +2 -2
- package/dist/agui-types.d.ts.map +1 -1
- package/dist/cli.cjs +18 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +18 -1
- package/dist/cli.js.map +1 -1
- package/dist/fal-audio.cjs +12 -6
- package/dist/fal-audio.cjs.map +1 -1
- package/dist/fal-audio.d.cts.map +1 -1
- package/dist/fal-audio.d.ts.map +1 -1
- package/dist/fal-audio.js +14 -8
- package/dist/fal-audio.js.map +1 -1
- package/dist/fal.cjs +100 -54
- package/dist/fal.cjs.map +1 -1
- package/dist/fal.d.cts +13 -0
- package/dist/fal.d.cts.map +1 -1
- package/dist/fal.d.ts +13 -0
- package/dist/fal.d.ts.map +1 -1
- package/dist/fal.js +101 -55
- package/dist/fal.js.map +1 -1
- package/dist/index.cjs +10 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -3
- package/dist/llmock.cjs +8 -3
- package/dist/llmock.cjs.map +1 -1
- package/dist/llmock.d.cts +5 -5
- package/dist/llmock.d.cts.map +1 -1
- package/dist/llmock.d.ts +5 -5
- package/dist/llmock.d.ts.map +1 -1
- package/dist/llmock.js +8 -3
- package/dist/llmock.js.map +1 -1
- package/dist/metrics.cjs +9 -0
- package/dist/metrics.cjs.map +1 -1
- package/dist/metrics.d.cts.map +1 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/metrics.js +7 -1
- package/dist/metrics.js.map +1 -1
- package/dist/openrouter-video.cjs +1609 -0
- package/dist/openrouter-video.cjs.map +1 -0
- package/dist/openrouter-video.d.cts +154 -0
- package/dist/openrouter-video.d.cts.map +1 -0
- package/dist/openrouter-video.d.ts +154 -0
- package/dist/openrouter-video.d.ts.map +1 -0
- package/dist/openrouter-video.js +1601 -0
- package/dist/openrouter-video.js.map +1 -0
- package/dist/recorder.cjs +48 -7
- package/dist/recorder.cjs.map +1 -1
- package/dist/recorder.d.cts.map +1 -1
- package/dist/recorder.d.ts.map +1 -1
- package/dist/recorder.js +46 -8
- package/dist/recorder.js.map +1 -1
- package/dist/server.cjs +158 -10
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +2 -0
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +159 -11
- package/dist/server.js.map +1 -1
- package/dist/types.d.cts +100 -9
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.ts +100 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/vector-types.d.cts.map +1 -1
- package/package.json +2 -2
package/dist/types.d.cts
CHANGED
|
@@ -242,6 +242,12 @@ interface VideoResponse {
|
|
|
242
242
|
id: string;
|
|
243
243
|
status: "processing" | "completed" | "failed";
|
|
244
244
|
url?: string;
|
|
245
|
+
/** Failure message surfaced by async video jobs (e.g. OpenRouter `error`). */
|
|
246
|
+
error?: string;
|
|
247
|
+
/** Base64-encoded video bytes served by content-download endpoints. */
|
|
248
|
+
b64?: string;
|
|
249
|
+
/** Generation cost surfaced in usage envelopes (e.g. OpenRouter `usage.cost`). */
|
|
250
|
+
cost?: number;
|
|
245
251
|
};
|
|
246
252
|
}
|
|
247
253
|
/**
|
|
@@ -252,6 +258,16 @@ interface VideoResponse {
|
|
|
252
258
|
interface RawJSONResponse extends ResponseOverrides {
|
|
253
259
|
json: unknown;
|
|
254
260
|
status?: number;
|
|
261
|
+
/**
|
|
262
|
+
* Billed quantity surfaced on the completed fal `queue-result` response via
|
|
263
|
+
* the `x-fal-billable-units` header (emitted alongside `x-fal-request-id` on
|
|
264
|
+
* the completed result). Real fal sets this header on its queue responses;
|
|
265
|
+
* recent versions of `@tanstack/ai-fal` read it to populate a consumer-side
|
|
266
|
+
* billed-units field (e.g. `usage.unitsBilled`). Omit it to preserve the
|
|
267
|
+
* header-less default — present only to let a fixture opt into exercising a
|
|
268
|
+
* consumer's cost/billing accounting path on replay.
|
|
269
|
+
*/
|
|
270
|
+
billableUnits?: number;
|
|
255
271
|
}
|
|
256
272
|
type FixtureResponse = TextResponse | ToolCallResponse | ContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse;
|
|
257
273
|
interface StreamingProfile {
|
|
@@ -303,6 +319,14 @@ interface Fixture {
|
|
|
303
319
|
}
|
|
304
320
|
type FixtureOpts = Omit<Fixture, "match" | "response">;
|
|
305
321
|
type EmbeddingFixtureOpts = Pick<FixtureOpts, "latency" | "chaos">;
|
|
322
|
+
/**
|
|
323
|
+
* Options for the fal queue/run fixture builders. Adds `billableUnits`, which
|
|
324
|
+
* is emitted as the `x-fal-billable-units` header on the completed
|
|
325
|
+
* `queue-result` response (see {@link RawJSONResponse.billableUnits}).
|
|
326
|
+
*/
|
|
327
|
+
type FalQueueOpts = FixtureOpts & {
|
|
328
|
+
billableUnits?: number;
|
|
329
|
+
};
|
|
306
330
|
interface FixtureFileToolCall {
|
|
307
331
|
name: string;
|
|
308
332
|
/** Accepts a JSON object or array for convenience — the loader will JSON.stringify it. */
|
|
@@ -391,8 +415,14 @@ interface JournalEntry {
|
|
|
391
415
|
/**
|
|
392
416
|
* What was going to serve this request. "fixture" = a fixture matched (or
|
|
393
417
|
* would have, before chaos intervened). "proxy" = no fixture matched and
|
|
394
|
-
* proxy was configured.
|
|
395
|
-
*
|
|
418
|
+
* proxy was configured. "internal" = entries where the request was served
|
|
419
|
+
* by aimock's own synthetic logic — neither a matched fixture nor a
|
|
420
|
+
* configured proxy: chaos-path entries (e.g. chaos on the OpenRouter
|
|
421
|
+
* video lifecycle endpoints; in REPLAY mode their normal 200/400/401/404
|
|
422
|
+
* entries omit source, while record-mode 200s on those endpoints carry
|
|
423
|
+
* source:"proxy") AND the OpenRouter video models listing synthesized as
|
|
424
|
+
* the fallback after a FAILED proxy attempt. Absent when the distinction
|
|
425
|
+
* doesn't apply (e.g. 404/503 fallback where nothing was going to serve).
|
|
396
426
|
*/
|
|
397
427
|
source?: "fixture" | "proxy" | "internal";
|
|
398
428
|
interrupted?: boolean;
|
|
@@ -462,7 +492,7 @@ interface ChatCompletionMessage {
|
|
|
462
492
|
reasoning_content?: string;
|
|
463
493
|
tool_calls?: ToolCallMessage[];
|
|
464
494
|
}
|
|
465
|
-
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal";
|
|
495
|
+
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal" | "openrouter";
|
|
466
496
|
interface RecordConfig {
|
|
467
497
|
providers: Partial<Record<RecordProviderKey, string>>;
|
|
468
498
|
fixturePath?: string;
|
|
@@ -481,11 +511,30 @@ interface RecordConfig {
|
|
|
481
511
|
* the poll cadence and timeout here if upstream is unusually slow or fast.
|
|
482
512
|
*/
|
|
483
513
|
fal?: FalRecordConfig;
|
|
514
|
+
/**
|
|
515
|
+
* OpenRouter-video-specific recording knobs for the live lifecycle proxy on
|
|
516
|
+
* `/api/v1/videos` (submit/poll proxied 1:1; completed jobs are captured
|
|
517
|
+
* eagerly as fixtures).
|
|
518
|
+
*/
|
|
519
|
+
openRouterVideo?: OpenRouterVideoRecordConfig;
|
|
484
520
|
/**
|
|
485
521
|
* Connection idle timeout (ms) on the upstream request socket — fires if the
|
|
486
522
|
* socket is inactive for this duration at any point before the response body
|
|
487
523
|
* begins. Default: 30_000 (30s). Increase for upstreams with slow initial
|
|
488
524
|
* responses (reasoning models, queue-backed providers).
|
|
525
|
+
*
|
|
526
|
+
* Nuance on the OpenRouter video surface: the small-JSON lifecycle fetches
|
|
527
|
+
* (submit, status poll, models listing) apply this value as a TOTAL
|
|
528
|
+
* deadline on the whole fetch — indistinguishable from an idle timeout for
|
|
529
|
+
* envelope-sized bodies. The byte-bearing content fetches (eager capture,
|
|
530
|
+
* proxy-only content relay) gate only the response HEADERS on this value;
|
|
531
|
+
* their body progress is governed by `bodyTimeoutMs` idle semantics.
|
|
532
|
+
*
|
|
533
|
+
* Ceiling note: the fetch-based OpenRouter proxy paths run on Node's
|
|
534
|
+
* built-in undici dispatcher, which carries its own ~300s
|
|
535
|
+
* headers/body-timeout defaults — values above that ceiling do not take
|
|
536
|
+
* effect on those paths without installing a custom undici dispatcher
|
|
537
|
+
* (out of aimock's scope).
|
|
489
538
|
*/
|
|
490
539
|
upstreamTimeoutMs?: number;
|
|
491
540
|
/**
|
|
@@ -493,10 +542,28 @@ interface RecordConfig {
|
|
|
493
542
|
* goes silent (no bytes) for this long after the response has started.
|
|
494
543
|
* Default: 30_000 (30s). Reasoning models under concurrent load can leave
|
|
495
544
|
* 30s+ gaps between streaming chunks while the model is thinking; lift this
|
|
496
|
-
* to e.g. 180_000 in those setups.
|
|
545
|
+
* to e.g. 180_000 in those setups. The OpenRouter video content fetches use
|
|
546
|
+
* the same idle semantics: the timer re-arms on every chunk, so a steadily
|
|
547
|
+
* downloading multi-minute video never times out — only a silent stall does.
|
|
497
548
|
*/
|
|
498
549
|
bodyTimeoutMs?: number;
|
|
499
550
|
}
|
|
551
|
+
interface OpenRouterVideoRecordConfig {
|
|
552
|
+
/**
|
|
553
|
+
* Maximum decoded video size (bytes) embedded as `b64` in a recorded
|
|
554
|
+
* fixture. Captures larger than the cap are persisted WITHOUT `b64` (with a
|
|
555
|
+
* `_warning` in the fixture file) so a multi-hundred-MB video cannot bloat
|
|
556
|
+
* the fixture directory. The cap is also a memory guard: an upstream
|
|
557
|
+
* response that DECLARES an over-cap Content-Length is skipped without
|
|
558
|
+
* downloading, and a response with no declared length is streamed with the
|
|
559
|
+
* byte count enforced during the read — on exceed the download is aborted
|
|
560
|
+
* and nothing oversized is retained in memory. In both cases the
|
|
561
|
+
* same-session job serves the placeholder MP4. Default: 33554432 (32 MB
|
|
562
|
+
* decoded). Set 0 for unlimited. Negative or non-integer values are treated
|
|
563
|
+
* as the default (createServer warns at startup).
|
|
564
|
+
*/
|
|
565
|
+
maxContentBytes?: number;
|
|
566
|
+
}
|
|
500
567
|
interface FalRecordConfig {
|
|
501
568
|
/** Interval between status polls upstream during recording. Default: 1000ms. */
|
|
502
569
|
pollIntervalMs?: number;
|
|
@@ -563,12 +630,31 @@ interface MockServerOptions {
|
|
|
563
630
|
* legacy `/fal/queue/...` audio handler is unaffected.
|
|
564
631
|
*/
|
|
565
632
|
falQueue?: FalQueueConfig;
|
|
633
|
+
/**
|
|
634
|
+
* Configure OpenRouter async video job polling progression
|
|
635
|
+
* (`pending → in_progress → completed | failed` on `GET /api/v1/videos/{id}`).
|
|
636
|
+
* Same threshold semantics as `falQueue`. By default (0/0) the job is
|
|
637
|
+
* seeded terminal at submit — content is downloadable with zero polls, and
|
|
638
|
+
* the first status poll merely reports the already-terminal status.
|
|
639
|
+
*/
|
|
640
|
+
openRouterVideo?: FalQueueConfig;
|
|
566
641
|
}
|
|
642
|
+
/**
|
|
643
|
+
* Poll-progression thresholds, documented below in fal queue terms; when used
|
|
644
|
+
* as `openRouterVideo` the states map to `pending` / `in_progress` /
|
|
645
|
+
* `completed | failed`.
|
|
646
|
+
*/
|
|
567
647
|
interface FalQueueConfig {
|
|
568
648
|
/**
|
|
569
|
-
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`.
|
|
570
|
-
*
|
|
571
|
-
* on submit (no IN_QUEUE / IN_PROGRESS polls emitted)
|
|
649
|
+
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`. Unset and an
|
|
650
|
+
* explicit `0` differ: when BOTH fields are unset the job completes
|
|
651
|
+
* synchronously on submit (no IN_QUEUE / IN_PROGRESS polls emitted), but
|
|
652
|
+
* explicitly setting this field — even to `0` — enables progression when
|
|
653
|
+
* `pollsBeforeCompleted` is unset, with `pollsBeforeCompleted` defaulting
|
|
654
|
+
* to `pollsBeforeInProgress + 1` so the job passes through IN_PROGRESS
|
|
655
|
+
* (an explicit `pollsBeforeCompleted: 0` completes on submit only when
|
|
656
|
+
* `pollsBeforeInProgress` is `0` or unset — otherwise the clamp below
|
|
657
|
+
* lifts it to `pollsBeforeInProgress`).
|
|
572
658
|
*/
|
|
573
659
|
pollsBeforeInProgress?: number;
|
|
574
660
|
/**
|
|
@@ -576,7 +662,11 @@ interface FalQueueConfig {
|
|
|
576
662
|
* `pollsBeforeInProgress` is also unset (no progression), otherwise
|
|
577
663
|
* `pollsBeforeInProgress + 1` so the job spends one poll in IN_PROGRESS.
|
|
578
664
|
* An explicit value lower than `pollsBeforeInProgress` is clamped up so
|
|
579
|
-
* IN_PROGRESS is never skipped.
|
|
665
|
+
* IN_PROGRESS is never skipped. When equal to a nonzero
|
|
666
|
+
* `pollsBeforeInProgress` — or when `pollsBeforeInProgress` is unset or 0
|
|
667
|
+
* and this field is 1 (the IN_PROGRESS branch consumes the first poll) —
|
|
668
|
+
* the job still spends one poll in IN_PROGRESS, so the terminal status
|
|
669
|
+
* lands one poll later than configured.
|
|
580
670
|
*/
|
|
581
671
|
pollsBeforeCompleted?: number;
|
|
582
672
|
}
|
|
@@ -591,8 +681,9 @@ interface HandlerDefaults {
|
|
|
591
681
|
strict?: boolean;
|
|
592
682
|
requestTransform?: (req: ChatCompletionRequest) => ChatCompletionRequest;
|
|
593
683
|
falQueue?: FalQueueConfig;
|
|
684
|
+
openRouterVideo?: FalQueueConfig;
|
|
594
685
|
}
|
|
595
686
|
//# sourceMappingURL=types.d.ts.map
|
|
596
687
|
//#endregion
|
|
597
|
-
export { AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, Fixture, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse };
|
|
688
|
+
export { AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, FalQueueOpts, Fixture, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse };
|
|
598
689
|
//# sourceMappingURL=types.d.cts.map
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;UAQiB,SAAA;qBAER,MAAA,CAAK,sBACL,MAAA,CAAK,mCAET;EALY,aAAS,EAAA,MAAA,EAMD,GAAA,CAAI,MANH,EAAA,IAAA,EAMiB,MANjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAM4C,OAN5C,CAAA,OAAA,CAAA;EAAA,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,GAAuB,KAAK;;;;;;KAM5B,YAAA,GAAe;;;UASV,mBAAA;;;sBAGK;;;UAIL,2BAAA,SAAoC;aACxC;;;;;;;;UASI,uBAAA,SAAgC;;oBAE7B;;;;;;;;UASH,uCAAA,SAAgD;;oBAE7C;aACP;;;;;;;;KASD,mBAAA,GACR,0BACA,8BACA,0CACA,gBACA,oBACA,gBACA,gBACA,wBACA,gBACA;UAEa,WAAA;YACL;;UAGK,gBAAA;;;;;;;;;;;;;;;;;;;;YAmCL;;;;;qBAKS;oBACD;;UAEV;;;;;;UASO,YAAA;;;;;WAKN;QACH;;;;aAIK;;;;;;;;;;;;;;;;kBAgBK;;;;;UAQD,QAAA;;;;;WAKN;;;;;;;;UAKM,SAAA;;SAER;;;;UAKQ,QAAA;;;;eAIF;;UAGE,gBAAA;;;;;;;;;UASA,cAAA;;;;;WAKN;;;;;;;;UAKM,oBAAA;;WAEN;;;;UAKM,qBAAA;;;;;eAKF;;KAKH,iBAAA;UAcK,YAAA;aACJ,QAAQ,OAAO;;;;;;;;;;;;;;;;QAgBpB;;;;;;oBAMY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCH,2BAAA;;;;;;;;;;;;;;;;UAiBA,eAAA;;;;;;UAOA,iBAAA;;;;;;;;UAQP;;;;;;WAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkCgB,0BAA0B;;;;;;;;;;;aAWxC;;;;;;;;oBAQO;;;;;;;UAQH,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BA,eAAA;;;;UAIP;UACA;aACG;WACF;;2BAEgB,0BAA0B;aACxC;oBACO"}
|
package/dist/types.d.ts
CHANGED
|
@@ -242,6 +242,12 @@ interface VideoResponse {
|
|
|
242
242
|
id: string;
|
|
243
243
|
status: "processing" | "completed" | "failed";
|
|
244
244
|
url?: string;
|
|
245
|
+
/** Failure message surfaced by async video jobs (e.g. OpenRouter `error`). */
|
|
246
|
+
error?: string;
|
|
247
|
+
/** Base64-encoded video bytes served by content-download endpoints. */
|
|
248
|
+
b64?: string;
|
|
249
|
+
/** Generation cost surfaced in usage envelopes (e.g. OpenRouter `usage.cost`). */
|
|
250
|
+
cost?: number;
|
|
245
251
|
};
|
|
246
252
|
}
|
|
247
253
|
/**
|
|
@@ -252,6 +258,16 @@ interface VideoResponse {
|
|
|
252
258
|
interface RawJSONResponse extends ResponseOverrides {
|
|
253
259
|
json: unknown;
|
|
254
260
|
status?: number;
|
|
261
|
+
/**
|
|
262
|
+
* Billed quantity surfaced on the completed fal `queue-result` response via
|
|
263
|
+
* the `x-fal-billable-units` header (emitted alongside `x-fal-request-id` on
|
|
264
|
+
* the completed result). Real fal sets this header on its queue responses;
|
|
265
|
+
* recent versions of `@tanstack/ai-fal` read it to populate a consumer-side
|
|
266
|
+
* billed-units field (e.g. `usage.unitsBilled`). Omit it to preserve the
|
|
267
|
+
* header-less default — present only to let a fixture opt into exercising a
|
|
268
|
+
* consumer's cost/billing accounting path on replay.
|
|
269
|
+
*/
|
|
270
|
+
billableUnits?: number;
|
|
255
271
|
}
|
|
256
272
|
type FixtureResponse = TextResponse | ToolCallResponse | ContentWithToolCallsResponse | ErrorResponse | EmbeddingResponse | ImageResponse | AudioResponse | TranscriptionResponse | VideoResponse | RawJSONResponse;
|
|
257
273
|
interface StreamingProfile {
|
|
@@ -303,6 +319,14 @@ interface Fixture {
|
|
|
303
319
|
}
|
|
304
320
|
type FixtureOpts = Omit<Fixture, "match" | "response">;
|
|
305
321
|
type EmbeddingFixtureOpts = Pick<FixtureOpts, "latency" | "chaos">;
|
|
322
|
+
/**
|
|
323
|
+
* Options for the fal queue/run fixture builders. Adds `billableUnits`, which
|
|
324
|
+
* is emitted as the `x-fal-billable-units` header on the completed
|
|
325
|
+
* `queue-result` response (see {@link RawJSONResponse.billableUnits}).
|
|
326
|
+
*/
|
|
327
|
+
type FalQueueOpts = FixtureOpts & {
|
|
328
|
+
billableUnits?: number;
|
|
329
|
+
};
|
|
306
330
|
interface FixtureFileToolCall {
|
|
307
331
|
name: string;
|
|
308
332
|
/** Accepts a JSON object or array for convenience — the loader will JSON.stringify it. */
|
|
@@ -391,8 +415,14 @@ interface JournalEntry {
|
|
|
391
415
|
/**
|
|
392
416
|
* What was going to serve this request. "fixture" = a fixture matched (or
|
|
393
417
|
* would have, before chaos intervened). "proxy" = no fixture matched and
|
|
394
|
-
* proxy was configured.
|
|
395
|
-
*
|
|
418
|
+
* proxy was configured. "internal" = entries where the request was served
|
|
419
|
+
* by aimock's own synthetic logic — neither a matched fixture nor a
|
|
420
|
+
* configured proxy: chaos-path entries (e.g. chaos on the OpenRouter
|
|
421
|
+
* video lifecycle endpoints; in REPLAY mode their normal 200/400/401/404
|
|
422
|
+
* entries omit source, while record-mode 200s on those endpoints carry
|
|
423
|
+
* source:"proxy") AND the OpenRouter video models listing synthesized as
|
|
424
|
+
* the fallback after a FAILED proxy attempt. Absent when the distinction
|
|
425
|
+
* doesn't apply (e.g. 404/503 fallback where nothing was going to serve).
|
|
396
426
|
*/
|
|
397
427
|
source?: "fixture" | "proxy" | "internal";
|
|
398
428
|
interrupted?: boolean;
|
|
@@ -462,7 +492,7 @@ interface ChatCompletionMessage {
|
|
|
462
492
|
reasoning_content?: string;
|
|
463
493
|
tool_calls?: ToolCallMessage[];
|
|
464
494
|
}
|
|
465
|
-
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal";
|
|
495
|
+
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal" | "openrouter";
|
|
466
496
|
interface RecordConfig {
|
|
467
497
|
providers: Partial<Record<RecordProviderKey, string>>;
|
|
468
498
|
fixturePath?: string;
|
|
@@ -481,11 +511,30 @@ interface RecordConfig {
|
|
|
481
511
|
* the poll cadence and timeout here if upstream is unusually slow or fast.
|
|
482
512
|
*/
|
|
483
513
|
fal?: FalRecordConfig;
|
|
514
|
+
/**
|
|
515
|
+
* OpenRouter-video-specific recording knobs for the live lifecycle proxy on
|
|
516
|
+
* `/api/v1/videos` (submit/poll proxied 1:1; completed jobs are captured
|
|
517
|
+
* eagerly as fixtures).
|
|
518
|
+
*/
|
|
519
|
+
openRouterVideo?: OpenRouterVideoRecordConfig;
|
|
484
520
|
/**
|
|
485
521
|
* Connection idle timeout (ms) on the upstream request socket — fires if the
|
|
486
522
|
* socket is inactive for this duration at any point before the response body
|
|
487
523
|
* begins. Default: 30_000 (30s). Increase for upstreams with slow initial
|
|
488
524
|
* responses (reasoning models, queue-backed providers).
|
|
525
|
+
*
|
|
526
|
+
* Nuance on the OpenRouter video surface: the small-JSON lifecycle fetches
|
|
527
|
+
* (submit, status poll, models listing) apply this value as a TOTAL
|
|
528
|
+
* deadline on the whole fetch — indistinguishable from an idle timeout for
|
|
529
|
+
* envelope-sized bodies. The byte-bearing content fetches (eager capture,
|
|
530
|
+
* proxy-only content relay) gate only the response HEADERS on this value;
|
|
531
|
+
* their body progress is governed by `bodyTimeoutMs` idle semantics.
|
|
532
|
+
*
|
|
533
|
+
* Ceiling note: the fetch-based OpenRouter proxy paths run on Node's
|
|
534
|
+
* built-in undici dispatcher, which carries its own ~300s
|
|
535
|
+
* headers/body-timeout defaults — values above that ceiling do not take
|
|
536
|
+
* effect on those paths without installing a custom undici dispatcher
|
|
537
|
+
* (out of aimock's scope).
|
|
489
538
|
*/
|
|
490
539
|
upstreamTimeoutMs?: number;
|
|
491
540
|
/**
|
|
@@ -493,10 +542,28 @@ interface RecordConfig {
|
|
|
493
542
|
* goes silent (no bytes) for this long after the response has started.
|
|
494
543
|
* Default: 30_000 (30s). Reasoning models under concurrent load can leave
|
|
495
544
|
* 30s+ gaps between streaming chunks while the model is thinking; lift this
|
|
496
|
-
* to e.g. 180_000 in those setups.
|
|
545
|
+
* to e.g. 180_000 in those setups. The OpenRouter video content fetches use
|
|
546
|
+
* the same idle semantics: the timer re-arms on every chunk, so a steadily
|
|
547
|
+
* downloading multi-minute video never times out — only a silent stall does.
|
|
497
548
|
*/
|
|
498
549
|
bodyTimeoutMs?: number;
|
|
499
550
|
}
|
|
551
|
+
interface OpenRouterVideoRecordConfig {
|
|
552
|
+
/**
|
|
553
|
+
* Maximum decoded video size (bytes) embedded as `b64` in a recorded
|
|
554
|
+
* fixture. Captures larger than the cap are persisted WITHOUT `b64` (with a
|
|
555
|
+
* `_warning` in the fixture file) so a multi-hundred-MB video cannot bloat
|
|
556
|
+
* the fixture directory. The cap is also a memory guard: an upstream
|
|
557
|
+
* response that DECLARES an over-cap Content-Length is skipped without
|
|
558
|
+
* downloading, and a response with no declared length is streamed with the
|
|
559
|
+
* byte count enforced during the read — on exceed the download is aborted
|
|
560
|
+
* and nothing oversized is retained in memory. In both cases the
|
|
561
|
+
* same-session job serves the placeholder MP4. Default: 33554432 (32 MB
|
|
562
|
+
* decoded). Set 0 for unlimited. Negative or non-integer values are treated
|
|
563
|
+
* as the default (createServer warns at startup).
|
|
564
|
+
*/
|
|
565
|
+
maxContentBytes?: number;
|
|
566
|
+
}
|
|
500
567
|
interface FalRecordConfig {
|
|
501
568
|
/** Interval between status polls upstream during recording. Default: 1000ms. */
|
|
502
569
|
pollIntervalMs?: number;
|
|
@@ -563,12 +630,31 @@ interface MockServerOptions {
|
|
|
563
630
|
* legacy `/fal/queue/...` audio handler is unaffected.
|
|
564
631
|
*/
|
|
565
632
|
falQueue?: FalQueueConfig;
|
|
633
|
+
/**
|
|
634
|
+
* Configure OpenRouter async video job polling progression
|
|
635
|
+
* (`pending → in_progress → completed | failed` on `GET /api/v1/videos/{id}`).
|
|
636
|
+
* Same threshold semantics as `falQueue`. By default (0/0) the job is
|
|
637
|
+
* seeded terminal at submit — content is downloadable with zero polls, and
|
|
638
|
+
* the first status poll merely reports the already-terminal status.
|
|
639
|
+
*/
|
|
640
|
+
openRouterVideo?: FalQueueConfig;
|
|
566
641
|
}
|
|
642
|
+
/**
|
|
643
|
+
* Poll-progression thresholds, documented below in fal queue terms; when used
|
|
644
|
+
* as `openRouterVideo` the states map to `pending` / `in_progress` /
|
|
645
|
+
* `completed | failed`.
|
|
646
|
+
*/
|
|
567
647
|
interface FalQueueConfig {
|
|
568
648
|
/**
|
|
569
|
-
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`.
|
|
570
|
-
*
|
|
571
|
-
* on submit (no IN_QUEUE / IN_PROGRESS polls emitted)
|
|
649
|
+
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`. Unset and an
|
|
650
|
+
* explicit `0` differ: when BOTH fields are unset the job completes
|
|
651
|
+
* synchronously on submit (no IN_QUEUE / IN_PROGRESS polls emitted), but
|
|
652
|
+
* explicitly setting this field — even to `0` — enables progression when
|
|
653
|
+
* `pollsBeforeCompleted` is unset, with `pollsBeforeCompleted` defaulting
|
|
654
|
+
* to `pollsBeforeInProgress + 1` so the job passes through IN_PROGRESS
|
|
655
|
+
* (an explicit `pollsBeforeCompleted: 0` completes on submit only when
|
|
656
|
+
* `pollsBeforeInProgress` is `0` or unset — otherwise the clamp below
|
|
657
|
+
* lifts it to `pollsBeforeInProgress`).
|
|
572
658
|
*/
|
|
573
659
|
pollsBeforeInProgress?: number;
|
|
574
660
|
/**
|
|
@@ -576,7 +662,11 @@ interface FalQueueConfig {
|
|
|
576
662
|
* `pollsBeforeInProgress` is also unset (no progression), otherwise
|
|
577
663
|
* `pollsBeforeInProgress + 1` so the job spends one poll in IN_PROGRESS.
|
|
578
664
|
* An explicit value lower than `pollsBeforeInProgress` is clamped up so
|
|
579
|
-
* IN_PROGRESS is never skipped.
|
|
665
|
+
* IN_PROGRESS is never skipped. When equal to a nonzero
|
|
666
|
+
* `pollsBeforeInProgress` — or when `pollsBeforeInProgress` is unset or 0
|
|
667
|
+
* and this field is 1 (the IN_PROGRESS branch consumes the first poll) —
|
|
668
|
+
* the job still spends one poll in IN_PROGRESS, so the terminal status
|
|
669
|
+
* lands one poll later than configured.
|
|
580
670
|
*/
|
|
581
671
|
pollsBeforeCompleted?: number;
|
|
582
672
|
}
|
|
@@ -591,8 +681,9 @@ interface HandlerDefaults {
|
|
|
591
681
|
strict?: boolean;
|
|
592
682
|
requestTransform?: (req: ChatCompletionRequest) => ChatCompletionRequest;
|
|
593
683
|
falQueue?: FalQueueConfig;
|
|
684
|
+
openRouterVideo?: FalQueueConfig;
|
|
594
685
|
}
|
|
595
686
|
//# sourceMappingURL=types.d.ts.map
|
|
596
687
|
//#endregion
|
|
597
|
-
export { AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, Fixture, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse };
|
|
688
|
+
export { AudioResponse, ChaosAction, ChaosConfig, ChatCompletion, ChatCompletionChoice, ChatCompletionMessage, ChatCompletionRequest, ChatMessage, ContentPart, ContentWithToolCallsResponse, EmbeddingFixtureOpts, EmbeddingResponse, ErrorResponse, FalQueueOpts, Fixture, FixtureFile, FixtureFileContentWithToolCallsResponse, FixtureFileEntry, FixtureFileResponse, FixtureFileTextResponse, FixtureFileToolCall, FixtureFileToolCallResponse, FixtureMatch, FixtureOpts, FixtureResponse, HandlerDefaults, ImageItem, ImageResponse, JournalEntry, MockServerOptions, Mountable, RawJSONResponse, RecordConfig, RecordProviderKey, RecordedTimings, ResponseFactory, ResponseOverrides, SSEChoice, SSEChunk, SSEDelta, SSEToolCallDelta, StreamingProfile, TextResponse, ToolCall, ToolCallMessage, ToolCallResponse, ToolDefinition, TranscriptionResponse, VideoResponse };
|
|
598
689
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;UAQiB,SAAA;qBAER,MAAA,CAAK,sBACL,MAAA,CAAK,mCAET;EALY,aAAS,EAAA,MAAA,EAMD,GAAA,CAAI,MANH,EAAA,IAAA,EAMiB,MANjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAM4C,OAN5C,CAAA,OAAA,CAAA;EAAA,MAAA,GAAA,EAAA;IAEjB,MAAK,EAAA,MAAA;IACL,CAAA,GAAA,EAAK,MAAA,CAAA,EAAA,OAAA;;YAGe,EAAA,OAAA,EAEN,OAFM,CAAA,EAAA,IAAA;YAAc,EAAA,GAAA,EAAA,MAAA,CAAA,EAAA,IAAA;aAA2B,EAAA,QAAA,EAI7C,eAJ6C,CAAA,EAAA,IAAA;;AAI7C,UAGR,WAAA,CAHQ;EAAe,IAAA,EAAA,MAAA;EAGvB,IAAA,CAAA,EAAA,MAAA;EAMA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAW,OAAA;;AAER,UAFH,WAAA,CAEG;MAEL,EAAA,QAAA,GAAA,MAAA,GAAA,WAAA,GAAA,MAAA;EAAe,OAAA,EAAA,MAAA,GAFV,WAEU,EAAA,GAAA,IAAA;EAIb,IAAA,CAAA,EAAA,MAAA;EAMA,UAAA,CAAA,EAVF,eAUuB,EAAA;EAAA,YAAA,CAAA,EAAA,MAAA;;AAO5B,UAbO,eAAA,CAaP;EAAc,EAAA,EAAA,MAAA;EAYP,IAAA,EAAA,UAAA;EAOA,QAAA,EAAA;IAAY,IAAA,EAAA,MAAA;IACJ,SAAA,EAAA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;;;;;;;;UAiBA,eAAA;;;;;;UAOA,iBAAA;;;;;;;;UAQP;;;;;;WAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkCgB,0BAA0B;;;;;;;;;;;aAWxC;;;;;;;;oBAQO;;;;;;;UAQH,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BA,eAAA;;;;UAIP;UACA;aACG;WACF;;2BAEgB,0BAA0B;aACxC;oBACO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-types.d.cts","names":[],"sources":["../src/vector-types.ts"],"sourcesContent":[],"mappings":";UAAiB,iBAAA;EAAA,IAAA,CAAA,EAAA,MAAA;EAKA,IAAA,CAAA,EAAA,MAAA;;AAGM,UAHN,gBAAA,CAGM;MAAZ,EAAA,MAAA;EAAG,SAAA,EAAA,MAAA;EAGG,OAAA,EAHN,GAGM,CAAA,MAAW,EAHL,
|
|
1
|
+
{"version":3,"file":"vector-types.d.cts","names":[],"sources":["../src/vector-types.ts"],"sourcesContent":[],"mappings":";UAAiB,iBAAA;EAAA,IAAA,CAAA,EAAA,MAAA;EAKA,IAAA,CAAA,EAAA,MAAA;;AAGM,UAHN,gBAAA,CAGM;MAAZ,EAAA,MAAA;EAAG,SAAA,EAAA,MAAA;EAGG,OAAA,EAHN,GAGM,CAAA,MAAW,EAHL,WAMJ,CAAA;AAGnB;AAOiB,UAbA,WAAA,CAaW;EAOhB,EAAA,EAAA,MAAA;EAAY,MAAA,EAAA,MAAA,EAAA;UAAG,CAAA,EAjBd,MAiBc,CAAA,MAAA,EAAA,OAAA,CAAA;;AAAyC,UAdnD,WAAA,CAcmD;EAAW,EAAA,EAAA,MAAA;;aAXlE;;;UAII,WAAA;;;;;;KAOL,YAAA,GAAe,yBAAyB,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/aimock",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Mock infrastructure for AI application testing — LLM APIs, image generation, image editing, text-to-speech, transcription, audio translation, audio generation, video generation, embeddings, MCP tools, A2A agents, AG-UI event streams, vector databases, search, rerank, and moderation. One package, one port, zero dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
},
|
|
191
191
|
"devDependencies": {
|
|
192
192
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
193
|
-
"@arethetypeswrong/cli": "^0.
|
|
193
|
+
"@arethetypeswrong/cli": "^0.18.3",
|
|
194
194
|
"@commitlint/cli": "^19.8.1",
|
|
195
195
|
"@commitlint/config-conventional": "^19.8.0",
|
|
196
196
|
"@eslint/js": "^9.30.0",
|