From 3481058e09cb26eb5ee29c6661a104b1fa664bca Mon Sep 17 00:00:00 2001 From: luulam Date: Fri, 25 Sep 2026 16:09:04 +0700 Subject: [PATCH] fix(usage): drop duplicated commandcode import and features block The previous origin/master merges (11089ab1 and earlier) left two auto-merged artifacts behind because both sides added the same lines in different places: - services/usage.js declared `getCommandCodeUsage` twice (import + handler), which is an ESM SyntaxError on a clean checkout. The working tree masked it, so `next build` passed locally while the committed tree did not parse. - providers/registry/commandcode.js carried two `features` blocks; the second one shadowed the first for `usage`/`usageApikey`. Verified with `node --check` on the committed blob. --- open-sse/providers/registry/commandcode.js | 4 ---- open-sse/services/usage.js | 2 -- 2 files changed, 6 deletions(-) diff --git a/open-sse/providers/registry/commandcode.js b/open-sse/providers/registry/commandcode.js index 75631b8c..4b41336d 100644 --- a/open-sse/providers/registry/commandcode.js +++ b/open-sse/providers/registry/commandcode.js @@ -38,10 +38,6 @@ export default { summaryUrl: "/alpha/usage/summary", }, }, - features: { - usage: true, - usageApikey: true, - }, models: [ { id: "deepseek/deepseek-v4-pro", name: "DeepSeek V4 Pro" }, { id: "deepseek/deepseek-v4-flash", name: "DeepSeek V4 Flash" }, diff --git a/open-sse/services/usage.js b/open-sse/services/usage.js index d02082ff..cf7d4c24 100644 --- a/open-sse/services/usage.js +++ b/open-sse/services/usage.js @@ -23,7 +23,6 @@ import { getZedUsage } from "./usage/zed.js"; import { getXiaomiMimoUsage } from "./usage/xiaomi-mimo.js"; import { resolveQoderCredentials } from "./qoderModels.js"; import { getGlmUsage } from "./usage/glm.js"; -import { getCommandCodeUsage } from "./usage/commandcode.js"; import { getIflowUsage, getOllamaUsage, @@ -65,7 +64,6 @@ const USAGE_HANDLERS = { groq: (c) => getGroqUsage(c.apiKey, c.proxyOptions), zed: (c) => getZedUsage(c.accessToken, c.providerSpecificData, c.proxyOptions), "xiaomi-mimo": (c) => getXiaomiMimoUsage(c.accessToken, c.providerSpecificData, c.proxyOptions), - commandcode: (c) => getCommandCodeUsage(c.apiKey, c.proxyOptions), }; // Qoder intl/CN share one usage path: PATs must be exchanged to a job token