feat(clinepass): add ClinePass provider support

Register clinepass provider (OAuth + API-key) using Cline's
OpenAI-compatible API with 10 curated models, live /v1/models
resolver, refreshCline-based token refresh with workos: prefix,
and dashboard OAuth login handler.

Reference: https://github.com/jellydn/pi-clinepass-provider
Closes #2261

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
sternelee
2026-07-03 10:53:41 +07:00
committed by decolua
co-authored by Cursor
parent 76752a4396
commit b08751c4ea
8 changed files with 282 additions and 84 deletions
@@ -232,8 +232,8 @@ export async function POST(request, { params }) {
});
}
// Cline uses authorization_code without PKCE. Kimchi returns a browser token.
const noPkceExchangeProviders = ["cline", "kimchi"];
// Cline and ClinePass use authorization_code without PKCE. Kimchi returns a browser token.
const noPkceExchangeProviders = ["cline", "clinepass", "kimchi"];
if (!code || !redirectUri || (!codeVerifier && !noPkceExchangeProviders.includes(provider))) {
return NextResponse.json({ error: "Missing required fields" }, { status: 400 });
}
+8
View File
@@ -11,6 +11,7 @@ import { resolveKiroModels } from "open-sse/services/kiroModels.js";
import { resolveKimchiModels } from "open-sse/services/kimchiModels.js";
import { resolveQoderModels } from "open-sse/services/qoderModels.js";
import { resolveCopilotModels } from "open-sse/services/copilotModels.js";
import { resolveClinepassModels } from "open-sse/services/clinepassModels.js";
import { updateProviderCredentials } from "@/sse/services/tokenRefresh";
import { capabilitiesFromServiceKind } from "open-sse/providers/capabilities.js";
@@ -63,6 +64,13 @@ const LIVE_MODEL_RESOLVERS = {
},
});
return result?.models?.length ? { models: result.models } : null;
},
clinepass: async (conn) => {
const result = await resolveClinepassModels({
accessToken: conn.accessToken,
apiKey: conn.apiKey,
});
return result?.models?.length ? { models: result.models } : null;
}
};