From 9be6588cc8780329e64e200ee7c9c5de02b2b531 Mon Sep 17 00:00:00 2001 From: decolua Date: Wed, 29 Jul 2026 21:05:23 +0700 Subject: [PATCH] chore: drop source-attribution comments from provider code Remove "Ported from OmniRoute" and cockpit-tools attribution comments. User-Agent strings and README/landing credits are left intact. Co-Authored-By: Claude Fable 5 --- open-sse/executors/zed.js | 3 +-- open-sse/handlers/search/callers.js | 1 - open-sse/handlers/search/normalizers.js | 1 - open-sse/providers/registry/codebuddy-intl.js | 3 +-- open-sse/providers/registry/zed.js | 8 +++----- open-sse/services/usage/grok-cli.js | 2 +- open-sse/services/usage/kimi.js | 2 +- open-sse/shared/zedAuth.js | 1 - tests/unit/kimi-usage.test.js | 2 +- 9 files changed, 8 insertions(+), 15 deletions(-) diff --git a/open-sse/executors/zed.js b/open-sse/executors/zed.js index d7ffb401..e6233fcb 100644 --- a/open-sse/executors/zed.js +++ b/open-sse/executors/zed.js @@ -10,8 +10,7 @@ // depending on which upstream Zed fronts for the model — translated back to // OpenAI Chat Completions by reusing the existing translators. // -// Ported from OmniRoute open-sse/executors/zed-hosted.ts. Overrides execute() -// entirely (does NOT use DefaultExecutor's pipeline) because the Zed wire +// Overrides execute() entirely (does NOT use DefaultExecutor's pipeline) because the Zed wire // shape (thread envelope, LLM-token exchange, NDJSON status frames) doesn't // fit the generic transformRequest/buildUrl contract. diff --git a/open-sse/handlers/search/callers.js b/open-sse/handlers/search/callers.js index 64f045c3..e32d93ed 100644 --- a/open-sse/handlers/search/callers.js +++ b/open-sse/handlers/search/callers.js @@ -1,7 +1,6 @@ /** * Search Provider Request Builders * - * Ported from OmniRoute open-sse/handlers/search.ts (lines 223-610). * Builds HTTP request `{ url, init }` for 10 search providers. * * @typedef {Object} SearchProviderConfig diff --git a/open-sse/handlers/search/normalizers.js b/open-sse/handlers/search/normalizers.js index da008bf3..898b271f 100644 --- a/open-sse/handlers/search/normalizers.js +++ b/open-sse/handlers/search/normalizers.js @@ -1,7 +1,6 @@ /** * Search Response Normalizers * - * Ported from OmniRoute open-sse/handlers/search.ts. * Each normalizer maps a provider-specific response into the unified SearchResult shape. */ diff --git a/open-sse/providers/registry/codebuddy-intl.js b/open-sse/providers/registry/codebuddy-intl.js index 4faaf804..7e69836c 100644 --- a/open-sse/providers/registry/codebuddy-intl.js +++ b/open-sse/providers/registry/codebuddy-intl.js @@ -1,6 +1,5 @@ // CodeBuddy international (codebuddy.ai) — mirrors codebuddy-cn registry shape, -// swapping the Tencent CN domain for the .ai endpoint set discovered in -// cockpit-tools/src-tauri/src/modules/codebuddy_oauth.rs. All OAuth/plugin URLs +// swapping the Tencent CN domain for the .ai endpoint set. All OAuth/plugin URLs // use the /v2/plugin prefix with platform=ide (CN uses platform=CLI). export default { id: "codebuddy-intl", diff --git a/open-sse/providers/registry/zed.js b/open-sse/providers/registry/zed.js index 5941b1e4..9224cf95 100644 --- a/open-sse/providers/registry/zed.js +++ b/open-sse/providers/registry/zed.js @@ -1,5 +1,4 @@ // Zed provider — RSA keypair callback auth (NOT standard OAuth). -// Source of truth: .repo/cockpit-tools/src-tauri/src/modules/zed_oauth.rs + zed_account.rs. export default { id: "zed", priority: 10, @@ -20,11 +19,10 @@ export default { hasOAuth: true, transport: { - // Zed hosted LLM aggregator (OmniRoute-verified): cloud.zed.dev/completions is a + // Zed hosted LLM aggregator: cloud.zed.dev/completions is a // multi-format proxy fronting Anthropic/OpenAI/Google/xAI depending on the model. // Wire protocol = NDJSON/SSE-ish stream authenticated with a short-lived LLM bearer - // token exchanged from the RSA-decrypted access_token (see open-sse/shared/zedAuth - // in OmniRoute). cockpit-tools only covered the RSA login + cloud.zed.dev quota path. + // token exchanged from the RSA-decrypted access_token (see open-sse/shared/zedAuth). baseUrl: "https://cloud.zed.dev/completions", format: "openai", forceStream: true, @@ -43,7 +41,7 @@ export default { url: "https://cloud.zed.dev/client/users/me", // verified in zed_account.rs }, // Live catalog discovery — Zed's hosted model list changes frequently and is fetched - // per-connection rather than hardcoded (OmniRoute pattern). + // per-connection rather than hardcoded. modelsUrl: "https://cloud.zed.dev/models", }, diff --git a/open-sse/services/usage/grok-cli.js b/open-sse/services/usage/grok-cli.js index 80d89677..768192ad 100644 --- a/open-sse/services/usage/grok-cli.js +++ b/open-sse/services/usage/grok-cli.js @@ -35,7 +35,7 @@ const USAGE = U("grok-cli"); const BILLING_URL = USAGE.url || "https://cli-chat-proxy.grok.com/v1/billing?format=credits"; const USER_URL = USAGE.userUrl || "https://cli-chat-proxy.grok.com/v1/user?include=subscription"; -// SuperGrok weekly pool — same endpoint OmniRoute #6844 / steipete CodexBar docs. +// SuperGrok weekly pool. const GRPC_CREDITS_URL = "https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig"; // Empty gRPC-web request frame (flag 0 + length 0). Without it upstream returns diff --git a/open-sse/services/usage/kimi.js b/open-sse/services/usage/kimi.js index 9fa92eda..4400965b 100644 --- a/open-sse/services/usage/kimi.js +++ b/open-sse/services/usage/kimi.js @@ -3,7 +3,7 @@ * * Dual auth (single provider id `kimi`): * - apiKey present → x-api-key only (platform / coding API key) - * - else accessToken → Bearer + X-Msh-* (device-code OAuth; OmniRoute parity) + * - else accessToken → Bearer + X-Msh-* (device-code OAuth) * * Note: chat messages use combined x-api-key; /usages OAuth is Bearer. * 403 permission_denied is NOT auth-expired — account lacks usage feature / sub. diff --git a/open-sse/shared/zedAuth.js b/open-sse/shared/zedAuth.js index 5f38298b..aa3337d7 100644 --- a/open-sse/shared/zedAuth.js +++ b/open-sse/shared/zedAuth.js @@ -1,5 +1,4 @@ // Zed hosted LLM aggregator — auth + model-catalog helpers. -// Ported from OmniRoute open-sse/shared/zedAuth.ts (plain JS, no TS types). // // Zed's cloud (cloud.zed.dev) authenticates native apps with a self-generated RSA // keypair instead of a registered OAuth client_id/secret: diff --git a/tests/unit/kimi-usage.test.js b/tests/unit/kimi-usage.test.js index 52d1e911..9d944a37 100644 --- a/tests/unit/kimi-usage.test.js +++ b/tests/unit/kimi-usage.test.js @@ -58,7 +58,7 @@ describe("getUsageForProvider(kimi) auth selection", () => { vi.clearAllMocks(); }); - it("OAuth path: Bearer + X-Msh-* (OmniRoute /usages parity; not chat x-api-key)", async () => { + it("OAuth path: Bearer + X-Msh-* (not chat x-api-key)", async () => { proxyAwareFetch.mockResolvedValueOnce(jsonResponse(ACTIVE_USAGE)); const usage = await getUsageForProvider({