feat(providers): add ClinePass API-key provider (#5942)

Integrated into release/v3.8.44 — ClinePass API-key (BYOK) provider (port upstream 9router#2304, co-authored @adentdk). Validated locally: 16 clinepass tests green; fixed the APIKEY count 158→159 + translate-path golden snapshot (clinepass is a genuine new provider). Remaining UNSTABLE red is the pre-existing environmental setup-claude base-red (opencode-plugin dist not built in fast-path). Supersedes stub #5541.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-02 17:36:16 -03:00
committed by GitHub
parent 2b0da37c19
commit 26fd7b6a8a
14 changed files with 548 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
import { getAntigravityModelsDiscoveryUrls } from "@omniroute/open-sse/config/antigravityUpstream.ts";
import { getAntigravityHeaders } from "@omniroute/open-sse/services/antigravityHeaders.ts";
import { parseGeminiModelsList } from "@/lib/providerModels/geminiModelsParser";
import { filterClinepassModels } from "@omniroute/open-sse/services/clinepassModels.ts";
import { normalizeOpenAiLikeModelsResponse } from "./normalizers";
export type ProviderModelsConfigEntry = {
@@ -246,6 +247,16 @@ export const PROVIDER_MODELS_CONFIG: Record<string, ProviderModelsConfigEntry> =
authPrefix: "Bearer ",
parseResponse: (data) => data.data || data.models || [],
},
// ClinePass (BYOK apikey gateway) — same host as OAuth `cline`, but only the
// `cline-pass/*` namespace is surfaced (filterClinepassModels).
clinepass: {
url: "https://api.cline.bot/api/v1/models",
method: "GET",
headers: { "Content-Type": "application/json" },
authHeader: "Authorization",
authPrefix: "Bearer ",
parseResponse: (data) => filterClinepassModels(Array.isArray(data) ? data : data?.data),
},
cohere: {
url: "https://api.cohere.com/v2/models",
method: "GET",

View File

@@ -28,6 +28,20 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
"Use a Command Code API key. Requests are sent to Command Code's /alpha/generate endpoint.",
apiHint: "Create or copy an API key from Command Code, then paste it here as a Bearer token.",
},
clinepass: {
id: "clinepass",
alias: "clinepass",
name: "ClinePass",
icon: "vpn_key",
color: "#5B9BD5",
textIcon: "CP",
passthroughModels: true,
website: "https://cline.bot",
notice: {
text: "ClinePass is Cline's paid BYOK gateway ($9.99/mo). Bring your own Cline API key; requests hit api.cline.bot with the cline-pass/* model namespace.",
apiKeyUrl: "https://app.cline.bot/settings/api-keys",
},
},
openrouter: {
id: "openrouter",
alias: "openrouter",