Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(ci): resolve remaining CI failures (typecheck + build-reorg test drift + #3100 dedup)

diegosouzapwdff836ae2651
diff --git a/open-sse/mcp-server/server.ts b/open-sse/mcp-server/server.ts
index 6f5ed6b7e5..ba2ee2b976 100644
--- a/open-sse/mcp-server/server.ts
+++ b/open-sse/mcp-server/server.ts
@@ -998,7 +998,7 @@ export function createMcpServer(): McpServer {
async (args) => {
try {
const parsedArgs = toolDef.inputSchema.parse(args ?? {});
- // @ts-expect-error - handler type lost through dynamic Object.values() access
+ // @ts-ignore - handler type lost through dynamic Object.values() access
const result = await toolDef.handler(parsedArgs);
return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
} catch (err) {
@@ -1025,7 +1025,7 @@ export function createMcpServer(): McpServer {
async (args) => {
try {
const parsedArgs = toolDef.inputSchema.parse(args ?? {});
- // @ts-expect-error - handler type lost through dynamic Object.values() access
+ // @ts-ignore - handler type lost through dynamic Object.values() access
const result = await toolDef.handler(parsedArgs);
return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
} catch (err) {
@@ -1102,7 +1102,7 @@ export function createMcpServer(): McpServer {
async (args) => {
try {
const parsedArgs = toolDef.inputSchema.parse(args ?? {});
- // @ts-expect-error - handler type lost through dynamic Object.values() access
+ // @ts-ignore - handler type lost through dynamic Object.values() access
const result = await toolDef.handler(parsedArgs);
return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
} catch (err) {
diff --git a/tests/unit/electron-packaging.test.ts b/tests/unit/electron-packaging.test.ts
index 057095119d..7d801cda8c 100644
--- a/tests/unit/electron-packaging.test.ts
+++ b/tests/unit/electron-packaging.test.ts
@@ -14,11 +14,11 @@ test("electron build copies standalone runtime dependencies into resources/app/n
assert.deepEqual(
extraResources.find(
(resource) =>
- resource?.from === "../.next/electron-standalone/node_modules" &&
+ resource?.from === "../.build/electron-standalone/node_modules" &&
resource?.to === "app/node_modules"
),
{
- from: "../.next/electron-standalone/node_modules",
+ from: "../.build/electron-standalone/node_modules",
to: "app/node_modules",
filter: ["**/*"],
}
diff --git a/tests/unit/glm-provider-model-import-route.test.ts b/tests/unit/glm-provider-model-import-route.test.ts
index 02d6eef6f1..dd174c93c6 100644
--- a/tests/unit/glm-provider-model-import-route.test.ts
+++ b/tests/unit/glm-provider-model-import-route.test.ts
@@ -60,14 +60,20 @@ test("GLM import uses international coding endpoint when apiRegion is internatio
test("GLM import normalizes custom coding models URLs without duplicating endpoints", async () => {
await resetStorage();
+ // Distinct apiKeys per connection: createProviderConnection dedups by decrypted
+ // key value (#3023), so a shared key would collapse these two custom-endpoint
+ // connections into one and the second would serve from the first's cached
+ // catalog (only one discovery fetch instead of two).
const cases = [
{
baseUrl: "https://api.z.ai/api/coding/paas/v4",
expectedUrl: "https://api.z.ai/api/coding/paas/v4/models",
+ apiKey: "glm-key-0",
},
{
baseUrl: "https://api.z.ai/api/coding/paas/v4/models",
expectedUrl: "https://api.z.ai/api/coding/paas/v4/models",
+ apiKey: "glm-key-1",
},
];
@@ -81,7 +87,7 @@ test("GLM import normalizes custom coding models URLs without duplicating endpoi
provider: "glm",
authType: "apikey",
name: `glm-custom-${index}`,
- apiKey: "glm-key",
+ apiKey: testCase.apiKey,
providerSpecificData: { baseUrl: testCase.baseUrl },
})
);
@@ -91,7 +97,7 @@ test("GLM import normalizes custom coding models URLs without duplicating endpoi
const expected = cases[seenUrls.length];
assert.ok(expected, `unexpected GLM discovery call to ${String(url)}`);
assert.equal(String(url), expected.expectedUrl);
- assert.equal(init.headers.Authorization, "Bearer glm-key");
+ assert.equal(init.headers.Authorization, `Bearer ${expected.apiKey}`);
assert.equal(init.headers["x-api-key"], undefined);
assert.equal(init.headers["anthropic-version"], undefined);
seenUrls.push(String(url));
diff --git a/tests/unit/pack-artifact-policy.test.ts b/tests/unit/pack-artifact-policy.test.ts
index 26b7b28536..71534eeb11 100644
--- a/tests/unit/pack-artifact-policy.test.ts
+++ b/tests/unit/pack-artifact-policy.test.ts
@@ -40,11 +40,11 @@ test("findUnexpectedArtifactPaths flags staged app files outside the allowlist",
test("findUnexpectedArtifactPaths flags app pack files outside the allowlist", () => {
const unexpectedPaths = findUnexpectedArtifactPaths(
[
- "app/open-sse/services/compression/engines/rtk/filters/generic-output.json",
- "app/open-sse/services/compression/rules/en/filler.json",
- "app/server.js",
- "app/scripts/dev/sync-env.mjs",
- "app/scripts/build/prepublish.mjs",
+ "dist/open-sse/services/compression/engines/rtk/filters/generic-output.json",
+ "dist/open-sse/services/compression/rules/en/filler.json",
+ "dist/server.js",
+ "dist/scripts/dev/sync-env.mjs",
+ "dist/scripts/build/prepublish.mjs",
"docs/extra.md",
],
{
@@ -53,7 +53,7 @@ test("findUnexpectedArtifactPaths flags app pack files outside the allowlist", (
}
);
- assert.deepEqual(unexpectedPaths, ["app/scripts/build/prepublish.mjs", "docs/extra.md"]);
+ assert.deepEqual(unexpectedPaths, ["dist/scripts/build/prepublish.mjs", "docs/extra.md"]);
});
test("setupPolyfill.ts is allowed in the tarball (bin/omniroute.mjs imports it at startup)", () => {
@@ -68,7 +68,7 @@ test("setupPolyfill.ts is allowed in the tarball (bin/omniroute.mjs imports it a
test("findMissingArtifactPaths flags missing root runtime files in the tarball", () => {
const missingPaths = findMissingArtifactPaths(
[
- "app/server.js",
+ "dist/server.js",
"bin/omniroute.mjs",
"package.json",
"scripts/build/postinstall.mjs",
@@ -77,15 +77,18 @@ test("findMissingArtifactPaths flags missing root runtime files in the tarball",
PACK_ARTIFACT_REQUIRED_PATHS
);
+ // findMissingArtifactPaths returns the missing required paths sorted
+ // alphabetically (bin/ < dist/ < scripts/ < src/), minus the paths present
+ // above (dist/server.js, bin/omniroute.mjs, package.json, the postinstall scripts).
assert.deepEqual(missingPaths, [
- "app/open-sse/services/compression/engines/rtk/filters/generic-output.json",
- "app/open-sse/services/compression/rules/en/filler.json",
- "app/peer-stamp.mjs",
- "app/responses-ws-proxy.mjs",
- "app/server-ws.mjs",
"bin/cli/program.mjs",
"bin/mcp-server.mjs",
"bin/nodeRuntimeSupport.mjs",
+ "dist/open-sse/services/compression/engines/rtk/filters/generic-output.json",
+ "dist/open-sse/services/compression/rules/en/filler.json",
+ "dist/peer-stamp.mjs",
+ "dist/responses-ws-proxy.mjs",
+ "dist/server-ws.mjs",
"scripts/build/native-binary-compat.mjs",
"src/shared/utils/nodeRuntimeSupport.ts",
]);