@copilotkit/aimock 1.45.0 → 1.45.1
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 +11 -0
- package/dist/agui-types.d.cts.map +1 -1
- package/dist/agui-types.d.ts.map +1 -1
- package/dist/config-loader.d.cts.map +1 -1
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/mcp-fakes.d.cts.map +1 -1
- package/dist/mcp-handler.cjs +7 -1
- package/dist/mcp-handler.cjs.map +1 -1
- package/dist/mcp-handler.js +7 -1
- package/dist/mcp-handler.js.map +1 -1
- package/dist/openrouter-video.cjs +30 -2
- package/dist/openrouter-video.cjs.map +1 -1
- package/dist/openrouter-video.d.cts.map +1 -1
- package/dist/openrouter-video.d.ts.map +1 -1
- package/dist/openrouter-video.js +30 -2
- package/dist/openrouter-video.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter-video.d.cts","names":[],"sources":["../src/openrouter-video.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"openrouter-video.d.cts","names":[],"sources":["../src/openrouter-video.ts"],"sourcesContent":[],"mappings":";;;;;cA+Ea,4BAAA;KAGR,qBAAA;AAHL,UAKU,wBAAA,CAL+B;EAGpC,IAAA,EAAA,QAAA;EAEK,KAAA,EAAA,MAAA;EAAwB,MAAA,EAGxB,qBAHwB;;WAWzB,EAAA,MAAA;EAAa;EAyBZ,qBAAA,EAAA,MAAwB;EAAA;sBAYxB,EAAA,MAAA;;EAWM,KAAA,EAhDP,aAgDO,CAAA,OAAA,CAAA;EAwBJ;;;;EAAwE,gBAAA,CAAA,EAAA,OAAA;EAoBvE;;;;;AAqNb;EAAiD,mBAAA,CAAA,EAAA,OAAA;;;;;;;;;;AAkKjD;;UA1bU,wBAAA,CA2bE;MACL,EAAA,QAAK;;OAGA,EAAA,MAAA;;;;;AAgnBZ;;;;QAGY,EAtiCF,qBAsiCE;;eAEA,EAAA,MAAA;;oBAET,EAAA,MAAA;EAAO;AAiJV;;;;;OAKW,EArrCF,OAqrCE,CAAA,OAAA,CAAA;;;;;;AA+nBX;;;;;;;;;;;;;;;;;KA5xDY,kBAAA,GAAqB,2BAA2B;;;;;;;;;;;;;;cAoB/C,qBAAA;;;;;;;;;;;;oBAgBO;wBAUI;;;;;iBA2LF,2BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,yCAEA,oBACD,mBACC,uCACY,MAAA,CAAK,+BACrB,wBACL;iBAyJmB,4BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,wCAED,mBACC,uCACY,MAAA,CAAK,+BACrB,wBACL;;;;;;;;;;;;;;;iBA6mBmB,2BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,0BACA,oBACD,mBACC,uCACY,MAAA,CAAK,0BAC1B;iBAiJmB,2BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,uCAEA,oBACD,mBACC,uCACY,MAAA,CAAK,+BACrB,wBACL;;;;;;;;;;;;;cA2nBU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter-video.d.ts","names":[],"sources":["../src/openrouter-video.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"openrouter-video.d.ts","names":[],"sources":["../src/openrouter-video.ts"],"sourcesContent":[],"mappings":";;;;;cA+Ea,4BAAA;KAGR,qBAAA;AAHL,UAKU,wBAAA,CAL+B;EAGpC,IAAA,EAAA,QAAA;EAEK,KAAA,EAAA,MAAA;EAAwB,MAAA,EAGxB,qBAHwB;;WAWzB,EAAA,MAAA;EAAa;EAyBZ,qBAAA,EAAA,MAAwB;EAAA;sBAYxB,EAAA,MAAA;;EAWM,KAAA,EAhDP,aAgDO,CAAA,OAAA,CAAA;EAwBJ;;;;EAAwE,gBAAA,CAAA,EAAA,OAAA;EAoBvE;;;;;AAqNb;EAAiD,mBAAA,CAAA,EAAA,OAAA;;;;;;;;;;AAkKjD;;UA1bU,wBAAA,CA2bE;MACL,EAAA,QAAK;;OAGA,EAAA,MAAA;;;;;AAgnBZ;;;;QAGY,EAtiCF,qBAsiCE;;eAEA,EAAA,MAAA;;oBAET,EAAA,MAAA;EAAO;AAiJV;;;;;OAKW,EArrCF,OAqrCE,CAAA,OAAA,CAAA;;;;;;AA+nBX;;;;;;;;;;;;;;;;;KA5xDY,kBAAA,GAAqB,2BAA2B;;;;;;;;;;;;;;cAoB/C,qBAAA;;;;;;;;;;;;oBAgBO;wBAUI;;;;;iBA2LF,2BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,yCAEA,oBACD,mBACC,uCACY,MAAA,CAAK,+BACrB,wBACL;iBAyJmB,4BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,wCAED,mBACC,uCACY,MAAA,CAAK,+BACrB,wBACL;;;;;;;;;;;;;;;iBA6mBmB,2BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,0BACA,oBACD,mBACC,uCACY,MAAA,CAAK,0BAC1B;iBAiJmB,2BAAA,MACf,MAAA,CAAK,sBACL,MAAA,CAAK,uCAEA,oBACD,mBACC,uCACY,MAAA,CAAK,+BACrB,wBACL;;;;;;;;;;;;;cA2nBU"}
|
package/dist/openrouter-video.js
CHANGED
|
@@ -10,6 +10,17 @@ import crypto from "node:crypto";
|
|
|
10
10
|
|
|
11
11
|
//#region src/openrouter-video.ts
|
|
12
12
|
const DEFAULT_OPENROUTER_VIDEO_MODEL = "bytedance/seedance-2.0";
|
|
13
|
+
/**
|
|
14
|
+
* Video models OpenRouter has REMOVED (deprecation policy: a removed surface
|
|
15
|
+
* never mocks success — it serves the rejection the real API serves now).
|
|
16
|
+
*
|
|
17
|
+
* openai/sora-2: gone from the live /api/v1/videos/models listing and from
|
|
18
|
+
* /api/v1/models (its /endpoints page is a 404). A live submit observed on
|
|
19
|
+
* 2026-10-10 is rejected with HTTP 400, content-type application/json, body
|
|
20
|
+
* `{"error":{"message":"Model openai/sora-2 does not exist","code":400}}` —
|
|
21
|
+
* the same rejection OpenRouter gives any unknown model id.
|
|
22
|
+
*/
|
|
23
|
+
const OPENROUTER_VIDEO_SUNSET_MODELS = new Set(["openai/sora-2"]);
|
|
13
24
|
const OPENROUTER_VIDEO_MAX_ENTRIES = 1e4;
|
|
14
25
|
const OPENROUTER_VIDEO_TTL_MS = 36e5;
|
|
15
26
|
/**
|
|
@@ -647,7 +658,7 @@ async function proxyOpenRouterVideoRecordContent(args) {
|
|
|
647
658
|
reader.cancel().catch(() => {});
|
|
648
659
|
}
|
|
649
660
|
}
|
|
650
|
-
const DEFAULT_OPENROUTER_VIDEO_MODELS = [DEFAULT_OPENROUTER_VIDEO_MODEL
|
|
661
|
+
const DEFAULT_OPENROUTER_VIDEO_MODELS = [DEFAULT_OPENROUTER_VIDEO_MODEL];
|
|
651
662
|
function modelEntry(id) {
|
|
652
663
|
return {
|
|
653
664
|
id,
|
|
@@ -737,7 +748,7 @@ async function handleOpenRouterVideoModels(req, res, fixtures, journal, defaults
|
|
|
737
748
|
let sawVideoFixture = false;
|
|
738
749
|
for (const f of fixtures) if (f.match.endpoint === "video") {
|
|
739
750
|
sawVideoFixture = true;
|
|
740
|
-
if (f.match.model && typeof f.match.model === "string") modelIds.add(f.match.model);
|
|
751
|
+
if (f.match.model && typeof f.match.model === "string" && !OPENROUTER_VIDEO_SUNSET_MODELS.has(f.match.model)) modelIds.add(f.match.model);
|
|
741
752
|
}
|
|
742
753
|
if (modelIds.size === 0 && sawVideoFixture) defaults.logger.warn("No video fixture contributes a string model — serving the default video model set");
|
|
743
754
|
const ids = modelIds.size > 0 ? [...modelIds] : DEFAULT_OPENROUTER_VIDEO_MODELS;
|
|
@@ -836,6 +847,23 @@ async function handleOpenRouterVideoCreate(req, res, raw, fixtures, journal, def
|
|
|
836
847
|
} }));
|
|
837
848
|
return;
|
|
838
849
|
}
|
|
850
|
+
if (videoReq.model !== void 0 && OPENROUTER_VIDEO_SUNSET_MODELS.has(videoReq.model)) {
|
|
851
|
+
journal.add({
|
|
852
|
+
method,
|
|
853
|
+
path,
|
|
854
|
+
headers: flattenHeaders(req.headers),
|
|
855
|
+
body: parsedBody,
|
|
856
|
+
response: {
|
|
857
|
+
status: 400,
|
|
858
|
+
fixture: null
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
writeErrorResponse(res, 400, JSON.stringify({ error: {
|
|
862
|
+
message: `Model ${videoReq.model} does not exist`,
|
|
863
|
+
code: 400
|
|
864
|
+
} }));
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
839
867
|
const syntheticReq = {
|
|
840
868
|
model: videoReq.model ?? DEFAULT_OPENROUTER_VIDEO_MODEL,
|
|
841
869
|
messages: [{
|