Repository navigation
Conversation
Crusoe's managed inference serves open models (gpt-oss-120b, Nemotron, Gemma, Kimi) over an OpenAI-compatible API, and OpenCode already knows its endpoint. Getting there meant hand-adding an OpenCode instance with the right environment variables. Add a Crusoe choice to the Add provider dialog. It creates an OpenCode instance with CRUSOE_API_KEY stored as a secret and OPENCODE_CONFIG_CONTENT limiting the instance to the crusoe provider, so its picker lists only Crusoe models. No server or contract changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 4 tasks
Crusoe only existed once added through the + dialog, so Settings > Providers showed the seven drivers but no Crusoe until then. Settings now keeps a standing Crusoe row (opencode_crusoe) below OpenCode, disabled, with an empty secret CRUSOE_API_KEY field. Pasting a key or turning it on saves it as a regular OpenCode instance. Like the built-in rows it has no delete; its reset removes the saved instance and the stored key, returning the row to its disabled state. The preset now lives in crusoePreset.ts, shared by the panel and the + dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Using Crusoe's managed inference (open models such as gpt-oss-120b, Nemotron, Gemma and Kimi over an OpenAI-compatible API) in Lecturn meant creating an OpenCode instance by hand and knowing which environment variables to set.
This adds Crusoe as a choice in the Add provider dialog. OpenCode already knows Crusoe's endpoint, so the choice is a preset rather than a new driver. It creates an OpenCode instance with:
CRUSOE_API_KEY, stored as a secret (kept in the secret store, never sent back to clients, deleted when the instance is removed)OPENCODE_CONFIG_CONTENT={"enabled_providers":["crusoe"]}, so the instance lists only Crusoe modelsThe label defaults to "Crusoe" (
opencode_crusoe), and the last step asks only for the API key; the dialog won't save without one. There are no server, contract or mobile changes. Each OpenCode instance already runs its ownopencode servewith that instance's environment.Before / after
A real turn on Crusoe gpt-oss-120b through Lecturn:
Crusoe listed in provider settings
Crusoe also has a standing row in Settings > Providers, below OpenCode, like the built-in drivers. It starts disabled, with an empty secret
CRUSOE_API_KEYfield. Pasting a key or turning it on saves it as theopencode_crusoeinstance. It has no delete button; reset removes the saved instance and the stored key. The + dialog option remains for adding a second Crusoe account. Cherry-picked from #99.Surfaces
docs/user/providers-crusoe.md, linked from the OpenCode page and the docs index.Known limitation
OpenCode's Crusoe model list comes from models.dev and is out of date. DeepSeek V3 0324 and GLM 5.1/5.2 are listed but return
model_not_found. DeepSeek V4 and GLM 5.3 are live on Crusoe but not listed. The user doc lists only models verified live. The fix belongs upstream in models.dev and will follow separately.Testing
vp test run apps/web/src/components/settingsplus the OpenCode provider and adapter tests: 351 passedbuildCrusoeProviderInstance: it refuses a blank key, the result decodes as aProviderInstanceConfig, the key is stored as a secret, and the instance is limited to CrusoeWritten by Claude Opus 5.5 in Claude Code.