feat(providers): add Cline free-tier models and sync Freebuff catalog

- Cline: 6 free models, cline-cli product headers, API-key auth,
  {data} envelope unwrap, workos: prefix handling
- Freebuff: muse-spark 1.3 → 1.2 (upstream withdrawal 2026-09-07),
  DeepSeek V4.1 Flash rename
This commit is contained in:
MUH. IQRAM BAHRING
2026-09-11 12:21:35 +08:00
parent 8b34cfaa44
commit b0505067b2
16 changed files with 319 additions and 64 deletions
+3 -9
View File
@@ -5,17 +5,11 @@ const FETCH_TIMEOUT_MS = 5000;
/**
* Build request headers for the ClinePass /models endpoint (Cline's upstream API).
* - API keys are sent as plain Bearer tokens.
* - OAuth access tokens must carry the WorkOS `workos:` prefix (handled by buildClineHeaders).
* Auth shape lives in shared/clineAuth: API keys ride plain Bearer, OAuth
* access tokens carry the WorkOS `workos:` prefix.
*/
function buildModelListHeaders(token, isApiKey) {
if (isApiKey) {
return {
Accept: "application/json",
Authorization: `Bearer ${token}`,
};
}
return buildClineHeaders(token, { Accept: "application/json" });
return buildClineHeaders(token, { Accept: "application/json" }, { isApiKey });
}
/**