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 <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user