@copilotkit/aimock 1.30.0 → 1.31.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 +16 -0
- package/README.md +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 +10 -4
- 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 +12 -6
- package/dist/fal-audio.js.map +1 -1
- package/dist/fal.cjs +51 -44
- package/dist/fal.cjs.map +1 -1
- package/dist/fal.d.cts +8 -0
- package/dist/fal.d.cts.map +1 -1
- package/dist/fal.d.ts +8 -0
- package/dist/fal.d.ts.map +1 -1
- package/dist/fal.js +52 -45
- 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 +2 -1
- package/dist/llmock.cjs.map +1 -1
- package/dist/llmock.d.cts.map +1 -1
- package/dist/llmock.d.ts.map +1 -1
- package/dist/llmock.js +2 -1
- 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 +81 -8
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.ts +81 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/ws-gemini-live.d.cts +2 -2
- package/dist/ws-realtime.d.cts +2 -2
- 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
|
/**
|
|
@@ -391,8 +397,14 @@ interface JournalEntry {
|
|
|
391
397
|
/**
|
|
392
398
|
* What was going to serve this request. "fixture" = a fixture matched (or
|
|
393
399
|
* would have, before chaos intervened). "proxy" = no fixture matched and
|
|
394
|
-
* proxy was configured.
|
|
395
|
-
*
|
|
400
|
+
* proxy was configured. "internal" = entries where the request was served
|
|
401
|
+
* by aimock's own synthetic logic — neither a matched fixture nor a
|
|
402
|
+
* configured proxy: chaos-path entries (e.g. chaos on the OpenRouter
|
|
403
|
+
* video lifecycle endpoints; in REPLAY mode their normal 200/400/401/404
|
|
404
|
+
* entries omit source, while record-mode 200s on those endpoints carry
|
|
405
|
+
* source:"proxy") AND the OpenRouter video models listing synthesized as
|
|
406
|
+
* the fallback after a FAILED proxy attempt. Absent when the distinction
|
|
407
|
+
* doesn't apply (e.g. 404/503 fallback where nothing was going to serve).
|
|
396
408
|
*/
|
|
397
409
|
source?: "fixture" | "proxy" | "internal";
|
|
398
410
|
interrupted?: boolean;
|
|
@@ -462,7 +474,7 @@ interface ChatCompletionMessage {
|
|
|
462
474
|
reasoning_content?: string;
|
|
463
475
|
tool_calls?: ToolCallMessage[];
|
|
464
476
|
}
|
|
465
|
-
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal";
|
|
477
|
+
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal" | "openrouter";
|
|
466
478
|
interface RecordConfig {
|
|
467
479
|
providers: Partial<Record<RecordProviderKey, string>>;
|
|
468
480
|
fixturePath?: string;
|
|
@@ -481,11 +493,30 @@ interface RecordConfig {
|
|
|
481
493
|
* the poll cadence and timeout here if upstream is unusually slow or fast.
|
|
482
494
|
*/
|
|
483
495
|
fal?: FalRecordConfig;
|
|
496
|
+
/**
|
|
497
|
+
* OpenRouter-video-specific recording knobs for the live lifecycle proxy on
|
|
498
|
+
* `/api/v1/videos` (submit/poll proxied 1:1; completed jobs are captured
|
|
499
|
+
* eagerly as fixtures).
|
|
500
|
+
*/
|
|
501
|
+
openRouterVideo?: OpenRouterVideoRecordConfig;
|
|
484
502
|
/**
|
|
485
503
|
* Connection idle timeout (ms) on the upstream request socket — fires if the
|
|
486
504
|
* socket is inactive for this duration at any point before the response body
|
|
487
505
|
* begins. Default: 30_000 (30s). Increase for upstreams with slow initial
|
|
488
506
|
* responses (reasoning models, queue-backed providers).
|
|
507
|
+
*
|
|
508
|
+
* Nuance on the OpenRouter video surface: the small-JSON lifecycle fetches
|
|
509
|
+
* (submit, status poll, models listing) apply this value as a TOTAL
|
|
510
|
+
* deadline on the whole fetch — indistinguishable from an idle timeout for
|
|
511
|
+
* envelope-sized bodies. The byte-bearing content fetches (eager capture,
|
|
512
|
+
* proxy-only content relay) gate only the response HEADERS on this value;
|
|
513
|
+
* their body progress is governed by `bodyTimeoutMs` idle semantics.
|
|
514
|
+
*
|
|
515
|
+
* Ceiling note: the fetch-based OpenRouter proxy paths run on Node's
|
|
516
|
+
* built-in undici dispatcher, which carries its own ~300s
|
|
517
|
+
* headers/body-timeout defaults — values above that ceiling do not take
|
|
518
|
+
* effect on those paths without installing a custom undici dispatcher
|
|
519
|
+
* (out of aimock's scope).
|
|
489
520
|
*/
|
|
490
521
|
upstreamTimeoutMs?: number;
|
|
491
522
|
/**
|
|
@@ -493,10 +524,28 @@ interface RecordConfig {
|
|
|
493
524
|
* goes silent (no bytes) for this long after the response has started.
|
|
494
525
|
* Default: 30_000 (30s). Reasoning models under concurrent load can leave
|
|
495
526
|
* 30s+ gaps between streaming chunks while the model is thinking; lift this
|
|
496
|
-
* to e.g. 180_000 in those setups.
|
|
527
|
+
* to e.g. 180_000 in those setups. The OpenRouter video content fetches use
|
|
528
|
+
* the same idle semantics: the timer re-arms on every chunk, so a steadily
|
|
529
|
+
* downloading multi-minute video never times out — only a silent stall does.
|
|
497
530
|
*/
|
|
498
531
|
bodyTimeoutMs?: number;
|
|
499
532
|
}
|
|
533
|
+
interface OpenRouterVideoRecordConfig {
|
|
534
|
+
/**
|
|
535
|
+
* Maximum decoded video size (bytes) embedded as `b64` in a recorded
|
|
536
|
+
* fixture. Captures larger than the cap are persisted WITHOUT `b64` (with a
|
|
537
|
+
* `_warning` in the fixture file) so a multi-hundred-MB video cannot bloat
|
|
538
|
+
* the fixture directory. The cap is also a memory guard: an upstream
|
|
539
|
+
* response that DECLARES an over-cap Content-Length is skipped without
|
|
540
|
+
* downloading, and a response with no declared length is streamed with the
|
|
541
|
+
* byte count enforced during the read — on exceed the download is aborted
|
|
542
|
+
* and nothing oversized is retained in memory. In both cases the
|
|
543
|
+
* same-session job serves the placeholder MP4. Default: 33554432 (32 MB
|
|
544
|
+
* decoded). Set 0 for unlimited. Negative or non-integer values are treated
|
|
545
|
+
* as the default (createServer warns at startup).
|
|
546
|
+
*/
|
|
547
|
+
maxContentBytes?: number;
|
|
548
|
+
}
|
|
500
549
|
interface FalRecordConfig {
|
|
501
550
|
/** Interval between status polls upstream during recording. Default: 1000ms. */
|
|
502
551
|
pollIntervalMs?: number;
|
|
@@ -563,12 +612,31 @@ interface MockServerOptions {
|
|
|
563
612
|
* legacy `/fal/queue/...` audio handler is unaffected.
|
|
564
613
|
*/
|
|
565
614
|
falQueue?: FalQueueConfig;
|
|
615
|
+
/**
|
|
616
|
+
* Configure OpenRouter async video job polling progression
|
|
617
|
+
* (`pending → in_progress → completed | failed` on `GET /api/v1/videos/{id}`).
|
|
618
|
+
* Same threshold semantics as `falQueue`. By default (0/0) the job is
|
|
619
|
+
* seeded terminal at submit — content is downloadable with zero polls, and
|
|
620
|
+
* the first status poll merely reports the already-terminal status.
|
|
621
|
+
*/
|
|
622
|
+
openRouterVideo?: FalQueueConfig;
|
|
566
623
|
}
|
|
624
|
+
/**
|
|
625
|
+
* Poll-progression thresholds, documented below in fal queue terms; when used
|
|
626
|
+
* as `openRouterVideo` the states map to `pending` / `in_progress` /
|
|
627
|
+
* `completed | failed`.
|
|
628
|
+
*/
|
|
567
629
|
interface FalQueueConfig {
|
|
568
630
|
/**
|
|
569
|
-
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`.
|
|
570
|
-
*
|
|
571
|
-
* on submit (no IN_QUEUE / IN_PROGRESS polls emitted)
|
|
631
|
+
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`. Unset and an
|
|
632
|
+
* explicit `0` differ: when BOTH fields are unset the job completes
|
|
633
|
+
* synchronously on submit (no IN_QUEUE / IN_PROGRESS polls emitted), but
|
|
634
|
+
* explicitly setting this field — even to `0` — enables progression when
|
|
635
|
+
* `pollsBeforeCompleted` is unset, with `pollsBeforeCompleted` defaulting
|
|
636
|
+
* to `pollsBeforeInProgress + 1` so the job passes through IN_PROGRESS
|
|
637
|
+
* (an explicit `pollsBeforeCompleted: 0` completes on submit only when
|
|
638
|
+
* `pollsBeforeInProgress` is `0` or unset — otherwise the clamp below
|
|
639
|
+
* lifts it to `pollsBeforeInProgress`).
|
|
572
640
|
*/
|
|
573
641
|
pollsBeforeInProgress?: number;
|
|
574
642
|
/**
|
|
@@ -576,7 +644,11 @@ interface FalQueueConfig {
|
|
|
576
644
|
* `pollsBeforeInProgress` is also unset (no progression), otherwise
|
|
577
645
|
* `pollsBeforeInProgress + 1` so the job spends one poll in IN_PROGRESS.
|
|
578
646
|
* An explicit value lower than `pollsBeforeInProgress` is clamped up so
|
|
579
|
-
* IN_PROGRESS is never skipped.
|
|
647
|
+
* IN_PROGRESS is never skipped. When equal to a nonzero
|
|
648
|
+
* `pollsBeforeInProgress` — or when `pollsBeforeInProgress` is unset or 0
|
|
649
|
+
* and this field is 1 (the IN_PROGRESS branch consumes the first poll) —
|
|
650
|
+
* the job still spends one poll in IN_PROGRESS, so the terminal status
|
|
651
|
+
* lands one poll later than configured.
|
|
580
652
|
*/
|
|
581
653
|
pollsBeforeCompleted?: number;
|
|
582
654
|
}
|
|
@@ -591,6 +663,7 @@ interface HandlerDefaults {
|
|
|
591
663
|
strict?: boolean;
|
|
592
664
|
requestTransform?: (req: ChatCompletionRequest) => ChatCompletionRequest;
|
|
593
665
|
falQueue?: FalQueueConfig;
|
|
666
|
+
openRouterVideo?: FalQueueConfig;
|
|
594
667
|
}
|
|
595
668
|
//# sourceMappingURL=types.d.ts.map
|
|
596
669
|
//#endregion
|
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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;KAIA,eAAA,SACL,0BACF,kBAAkB,QAAQ;UAId,OAAA;SACR;YACG,kBAAkB;;;;;qBAKT;oBACD;;UAEV;;;;;;KAOE,WAAA,GAAc,KAAK;KACnB,oBAAA,GAAuB,KAAK;UASvB,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
|
/**
|
|
@@ -391,8 +397,14 @@ interface JournalEntry {
|
|
|
391
397
|
/**
|
|
392
398
|
* What was going to serve this request. "fixture" = a fixture matched (or
|
|
393
399
|
* would have, before chaos intervened). "proxy" = no fixture matched and
|
|
394
|
-
* proxy was configured.
|
|
395
|
-
*
|
|
400
|
+
* proxy was configured. "internal" = entries where the request was served
|
|
401
|
+
* by aimock's own synthetic logic — neither a matched fixture nor a
|
|
402
|
+
* configured proxy: chaos-path entries (e.g. chaos on the OpenRouter
|
|
403
|
+
* video lifecycle endpoints; in REPLAY mode their normal 200/400/401/404
|
|
404
|
+
* entries omit source, while record-mode 200s on those endpoints carry
|
|
405
|
+
* source:"proxy") AND the OpenRouter video models listing synthesized as
|
|
406
|
+
* the fallback after a FAILED proxy attempt. Absent when the distinction
|
|
407
|
+
* doesn't apply (e.g. 404/503 fallback where nothing was going to serve).
|
|
396
408
|
*/
|
|
397
409
|
source?: "fixture" | "proxy" | "internal";
|
|
398
410
|
interrupted?: boolean;
|
|
@@ -462,7 +474,7 @@ interface ChatCompletionMessage {
|
|
|
462
474
|
reasoning_content?: string;
|
|
463
475
|
tool_calls?: ToolCallMessage[];
|
|
464
476
|
}
|
|
465
|
-
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal";
|
|
477
|
+
type RecordProviderKey = "openai" | "anthropic" | "gemini" | "gemini-interactions" | "vertexai" | "bedrock" | "azure" | "ollama" | "cohere" | "elevenlabs" | "fal" | "openrouter";
|
|
466
478
|
interface RecordConfig {
|
|
467
479
|
providers: Partial<Record<RecordProviderKey, string>>;
|
|
468
480
|
fixturePath?: string;
|
|
@@ -481,11 +493,30 @@ interface RecordConfig {
|
|
|
481
493
|
* the poll cadence and timeout here if upstream is unusually slow or fast.
|
|
482
494
|
*/
|
|
483
495
|
fal?: FalRecordConfig;
|
|
496
|
+
/**
|
|
497
|
+
* OpenRouter-video-specific recording knobs for the live lifecycle proxy on
|
|
498
|
+
* `/api/v1/videos` (submit/poll proxied 1:1; completed jobs are captured
|
|
499
|
+
* eagerly as fixtures).
|
|
500
|
+
*/
|
|
501
|
+
openRouterVideo?: OpenRouterVideoRecordConfig;
|
|
484
502
|
/**
|
|
485
503
|
* Connection idle timeout (ms) on the upstream request socket — fires if the
|
|
486
504
|
* socket is inactive for this duration at any point before the response body
|
|
487
505
|
* begins. Default: 30_000 (30s). Increase for upstreams with slow initial
|
|
488
506
|
* responses (reasoning models, queue-backed providers).
|
|
507
|
+
*
|
|
508
|
+
* Nuance on the OpenRouter video surface: the small-JSON lifecycle fetches
|
|
509
|
+
* (submit, status poll, models listing) apply this value as a TOTAL
|
|
510
|
+
* deadline on the whole fetch — indistinguishable from an idle timeout for
|
|
511
|
+
* envelope-sized bodies. The byte-bearing content fetches (eager capture,
|
|
512
|
+
* proxy-only content relay) gate only the response HEADERS on this value;
|
|
513
|
+
* their body progress is governed by `bodyTimeoutMs` idle semantics.
|
|
514
|
+
*
|
|
515
|
+
* Ceiling note: the fetch-based OpenRouter proxy paths run on Node's
|
|
516
|
+
* built-in undici dispatcher, which carries its own ~300s
|
|
517
|
+
* headers/body-timeout defaults — values above that ceiling do not take
|
|
518
|
+
* effect on those paths without installing a custom undici dispatcher
|
|
519
|
+
* (out of aimock's scope).
|
|
489
520
|
*/
|
|
490
521
|
upstreamTimeoutMs?: number;
|
|
491
522
|
/**
|
|
@@ -493,10 +524,28 @@ interface RecordConfig {
|
|
|
493
524
|
* goes silent (no bytes) for this long after the response has started.
|
|
494
525
|
* Default: 30_000 (30s). Reasoning models under concurrent load can leave
|
|
495
526
|
* 30s+ gaps between streaming chunks while the model is thinking; lift this
|
|
496
|
-
* to e.g. 180_000 in those setups.
|
|
527
|
+
* to e.g. 180_000 in those setups. The OpenRouter video content fetches use
|
|
528
|
+
* the same idle semantics: the timer re-arms on every chunk, so a steadily
|
|
529
|
+
* downloading multi-minute video never times out — only a silent stall does.
|
|
497
530
|
*/
|
|
498
531
|
bodyTimeoutMs?: number;
|
|
499
532
|
}
|
|
533
|
+
interface OpenRouterVideoRecordConfig {
|
|
534
|
+
/**
|
|
535
|
+
* Maximum decoded video size (bytes) embedded as `b64` in a recorded
|
|
536
|
+
* fixture. Captures larger than the cap are persisted WITHOUT `b64` (with a
|
|
537
|
+
* `_warning` in the fixture file) so a multi-hundred-MB video cannot bloat
|
|
538
|
+
* the fixture directory. The cap is also a memory guard: an upstream
|
|
539
|
+
* response that DECLARES an over-cap Content-Length is skipped without
|
|
540
|
+
* downloading, and a response with no declared length is streamed with the
|
|
541
|
+
* byte count enforced during the read — on exceed the download is aborted
|
|
542
|
+
* and nothing oversized is retained in memory. In both cases the
|
|
543
|
+
* same-session job serves the placeholder MP4. Default: 33554432 (32 MB
|
|
544
|
+
* decoded). Set 0 for unlimited. Negative or non-integer values are treated
|
|
545
|
+
* as the default (createServer warns at startup).
|
|
546
|
+
*/
|
|
547
|
+
maxContentBytes?: number;
|
|
548
|
+
}
|
|
500
549
|
interface FalRecordConfig {
|
|
501
550
|
/** Interval between status polls upstream during recording. Default: 1000ms. */
|
|
502
551
|
pollIntervalMs?: number;
|
|
@@ -563,12 +612,31 @@ interface MockServerOptions {
|
|
|
563
612
|
* legacy `/fal/queue/...` audio handler is unaffected.
|
|
564
613
|
*/
|
|
565
614
|
falQueue?: FalQueueConfig;
|
|
615
|
+
/**
|
|
616
|
+
* Configure OpenRouter async video job polling progression
|
|
617
|
+
* (`pending → in_progress → completed | failed` on `GET /api/v1/videos/{id}`).
|
|
618
|
+
* Same threshold semantics as `falQueue`. By default (0/0) the job is
|
|
619
|
+
* seeded terminal at submit — content is downloadable with zero polls, and
|
|
620
|
+
* the first status poll merely reports the already-terminal status.
|
|
621
|
+
*/
|
|
622
|
+
openRouterVideo?: FalQueueConfig;
|
|
566
623
|
}
|
|
624
|
+
/**
|
|
625
|
+
* Poll-progression thresholds, documented below in fal queue terms; when used
|
|
626
|
+
* as `openRouterVideo` the states map to `pending` / `in_progress` /
|
|
627
|
+
* `completed | failed`.
|
|
628
|
+
*/
|
|
567
629
|
interface FalQueueConfig {
|
|
568
630
|
/**
|
|
569
|
-
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`.
|
|
570
|
-
*
|
|
571
|
-
* on submit (no IN_QUEUE / IN_PROGRESS polls emitted)
|
|
631
|
+
* Status polls before transitioning `IN_QUEUE → IN_PROGRESS`. Unset and an
|
|
632
|
+
* explicit `0` differ: when BOTH fields are unset the job completes
|
|
633
|
+
* synchronously on submit (no IN_QUEUE / IN_PROGRESS polls emitted), but
|
|
634
|
+
* explicitly setting this field — even to `0` — enables progression when
|
|
635
|
+
* `pollsBeforeCompleted` is unset, with `pollsBeforeCompleted` defaulting
|
|
636
|
+
* to `pollsBeforeInProgress + 1` so the job passes through IN_PROGRESS
|
|
637
|
+
* (an explicit `pollsBeforeCompleted: 0` completes on submit only when
|
|
638
|
+
* `pollsBeforeInProgress` is `0` or unset — otherwise the clamp below
|
|
639
|
+
* lifts it to `pollsBeforeInProgress`).
|
|
572
640
|
*/
|
|
573
641
|
pollsBeforeInProgress?: number;
|
|
574
642
|
/**
|
|
@@ -576,7 +644,11 @@ interface FalQueueConfig {
|
|
|
576
644
|
* `pollsBeforeInProgress` is also unset (no progression), otherwise
|
|
577
645
|
* `pollsBeforeInProgress + 1` so the job spends one poll in IN_PROGRESS.
|
|
578
646
|
* An explicit value lower than `pollsBeforeInProgress` is clamped up so
|
|
579
|
-
* IN_PROGRESS is never skipped.
|
|
647
|
+
* IN_PROGRESS is never skipped. When equal to a nonzero
|
|
648
|
+
* `pollsBeforeInProgress` — or when `pollsBeforeInProgress` is unset or 0
|
|
649
|
+
* and this field is 1 (the IN_PROGRESS branch consumes the first poll) —
|
|
650
|
+
* the job still spends one poll in IN_PROGRESS, so the terminal status
|
|
651
|
+
* lands one poll later than configured.
|
|
580
652
|
*/
|
|
581
653
|
pollsBeforeCompleted?: number;
|
|
582
654
|
}
|
|
@@ -591,6 +663,7 @@ interface HandlerDefaults {
|
|
|
591
663
|
strict?: boolean;
|
|
592
664
|
requestTransform?: (req: ChatCompletionRequest) => ChatCompletionRequest;
|
|
593
665
|
falQueue?: FalQueueConfig;
|
|
666
|
+
openRouterVideo?: FalQueueConfig;
|
|
594
667
|
}
|
|
595
668
|
//# sourceMappingURL=types.d.ts.map
|
|
596
669
|
//#endregion
|
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;M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,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"}
|
|
@@ -2,7 +2,7 @@ import { Journal } from "./journal.cjs";
|
|
|
2
2
|
import { Logger } from "./logger.cjs";
|
|
3
3
|
import { ChatCompletionRequest, Fixture } from "./types.cjs";
|
|
4
4
|
import { WebSocketConnection } from "./ws-framing.cjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as node_http0 from "node:http";
|
|
6
6
|
|
|
7
7
|
//#region src/ws-gemini-live.d.ts
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ declare function handleWebSocketGeminiLive(ws: WebSocketConnection, fixtures: Fi
|
|
|
15
15
|
strict?: boolean;
|
|
16
16
|
requestTransform?: (req: ChatCompletionRequest) => ChatCompletionRequest;
|
|
17
17
|
testId?: string;
|
|
18
|
-
upgradeHeaders?:
|
|
18
|
+
upgradeHeaders?: node_http0.IncomingHttpHeaders;
|
|
19
19
|
}): void;
|
|
20
20
|
//# sourceMappingURL=ws-gemini-live.d.ts.map
|
|
21
21
|
//#endregion
|
package/dist/ws-realtime.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { Journal } from "./journal.cjs";
|
|
|
2
2
|
import { Logger } from "./logger.cjs";
|
|
3
3
|
import { ChatCompletionRequest, Fixture } from "./types.cjs";
|
|
4
4
|
import { WebSocketConnection } from "./ws-framing.cjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as node_http1 from "node:http";
|
|
6
6
|
|
|
7
7
|
//#region src/ws-realtime.d.ts
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ declare function handleWebSocketRealtime(ws: WebSocketConnection, fixtures: Fixt
|
|
|
15
15
|
strict?: boolean;
|
|
16
16
|
requestTransform?: (req: ChatCompletionRequest) => ChatCompletionRequest;
|
|
17
17
|
testId?: string;
|
|
18
|
-
upgradeHeaders?:
|
|
18
|
+
upgradeHeaders?: node_http1.IncomingHttpHeaders;
|
|
19
19
|
}): void;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { handleWebSocketRealtime };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/aimock",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.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",
|