fix(cline-sdk): unblock ClinePass cards and model selection - #580
Open
DanBeckDev wants to merge 1 commit into
Open
fix(cline-sdk): unblock ClinePass cards and model selection#580DanBeckDev wants to merge 1 commit into
DanBeckDev wants to merge 1 commit into
Conversation
|
PR author is not in the allowed authors list. |
Cards configured with the `cline-pass` provider failed at startup with `Unknown or disabled provider "cline-pass"`, and Settings only ever offered a single ClinePass model. The bundled `@clinebot/core` provider registry has no `cline-pass` entry, so the gateway threw during model resolution before any request was made. The provider id was still selectable because Kanban synthesizes a catalog entry for whatever provider the shared `~/.cline` config has selected, and the model picker fell back to the one saved model when the SDK returned none. ClinePass is not a separate API surface: it is the same Cline endpoint (`https://api.cline.bot/api/v1`), the same Cline account OAuth token, and the same OpenAI-compatible protocol as the usage-billing `cline` provider. Only the model namespace differs — the Cline API bills a request against the subscription when the model id is `cline-pass/*`. So Kanban now keeps `cline-pass` as its own selectable provider and hands the bundled SDK the `cline` provider id when starting a session, leaving the `cline-pass/*` model id untouched: - Route ClinePass sessions and system prompts through the registered `cline` provider, so requests resolve and reach the subscription unchanged. - Contribute a ClinePass catalog entry derived from the `cline` provider, and stand down once the SDK registers `cline-pass` itself. - List ClinePass models from the public model catalog the SDK already reads for live model metadata, cached and degrading to the saved model offline. - Treat ClinePass as a Cline account for OAuth login and refresh, `CLINE_API_KEY`, and the account features (profile, balance, organizations, account switching, Featurebase). fixes cline#552 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DanBeckDev
force-pushed
the
fix/cline-pass-provider
branch
from
August 5, 2026 09:55
89f97b6 to
a60430c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #552
This is a fix for the
bug-labeled report in #552 — ClinePass cards fail to start, andthe model picker shows a single model. Feature-request discussion #547 has the background
and the original root-cause analysis.
The bug
Starting a card with the
cline-passprovider fails immediately:Settings also lets you select ClinePass but shows only a single model — both symptoms in #552.
Root cause
The bundled
@clinebot/coreprovider registry has nocline-passentry, soGatewayRegistry.resolveModelthrows before any request is made. Reproducible against the pinned SDK in three lines:The two UI symptoms are separate Kanban-side effects of the same gap:
getProviderCatalog()synthesizes an entry for whatever provider the shared~/.clineconfig has selected, socline-passlooks supported even though the SDK has never heard of it.getProviderModels()falls back to the single saved model when the SDK returns none — hence "only one model at a time".Bumping the dependency does not help:
@clinebot/core@lateston npm is still0.0.38, and no version in that lineage definescline-pass. The provider only exists in the newer@cline/core+@cline/llmslineage that theclineCLI and the extension run on, and migrating Kanban across that gap (0.0.38 → 0.0.69, four packages) is a much larger change than this issue.The fix
ClinePass is not a separate API surface. Comparing the two provider definitions in
@cline/llms,cline-passandclineare identical apart from name, default model and model list:clinecline-passhttps://api.cline.bot/api/v1https://api.cline.bot/api/v1openai-chat/openai-compatibleopenai-chat/openai-compatibleworkos:token)workos:token)CLINE_API_KEYCLINE_API_KEYOnly the model namespace differs — the Cline API bills a request against the subscription when the model id is
cline-pass/*.So Kanban keeps
cline-passas its own selectable provider (own catalog entry, own model list, own saved settings, which stay keyed by the id the CLI and extension write) and hands the bundled SDK theclineprovider id when it starts a session, leaving thecline-pass/*model id untouched. Verified against the pinned SDK with an interceptingfetch— routing acline-pass/*model through the registeredclineprovider produces exactly the request the newer SDK would send:Changes, all inside the
src/cline-sdk/boundary plus two web-ui call sites:cline-pass-provider.ts(new) — provider ids, theisClineAccountProviderIdpredicate, andresolveSdkRuntimeProviderId, which mapscline-pass→clinefor SDK calls only.clineprovider, so ClinePass gets the same workspace-metadata prompt the official CLI uses.clineprovider (no restated endpoint/capabilities), so it is offered even when it is not the current selection. It stands down automatically if the SDK ever registerscline-passitself; there is a test for that.DEFAULT_MODELS_CATALOG_URL, which publishes the ClinePass models with names, capabilities and context windows), cached for 10 min in the service closure like the existing profile cache, and degrading to the saved model when offline. No hardcoded model table.CLINE_API_KEY, and profile / balance / organizations / account switching / Featurebase now accept both Cline-account providers instead of onlycline. Previously, selecting ClinePass silently blanked all of them.The one hardcoded value is
CLINE_PASS_DEFAULT_MODEL_ID = "cline-pass/glm-5.2", used as the catalog entry's default model; it mirrors thedefaultModelIdpublished forcline-passin@cline/llms.Testing
test/runtime/cline-sdk/cline-pass-provider.test.ts— provider-id predicates and SDK routing.test/runtime/cline-sdk/cline-pass-provider-service.test.ts— catalog contribution (including deferring to the SDK), model listing from the catalog plus the offline fallback, launch config (token prefixing,CLINE_API_KEY, ClinePass-named error, default model), and Cline account features with ClinePass selected.test/runtime/cline-sdk/cline-session-runtime.test.ts— regression test that a ClinePass session starts onproviderId: "cline"while keepingmodelId: "cline-pass/glm-5.2".@clinebot/coretest mocks gained theDEFAULT_MODELS_CATALOG_URLexport.npm run checkandnpm run buildboth pass.npm run testmatches the pre-existing failures onmain(git-history,runtime-state-stream.integration,task-command-exit.integration— all load-sensitive and passing in isolation).dist/cli.jsnow contains thecline-passhandling that was previously absent.Notes for reviewers
GET /api/v1/modelsendpoint (the account's real entitlements) than from the public catalog, that swap is contained to one function — I used the public catalog because I could verify its shape without a ClinePass account.clineandcline-pass. If a user's token happens to live only undercline, ClinePass shows as not signed in and one sign-in from Settings fixes it. Happy to add the fallback if you'd prefer it.🤖 Generated with Claude Code