/connect, add the provider configuration,
then select a Token Factory model from /models.
Prerequisites
- A Token Factory API key. See Authentication.
- OpenCode installed from its official documentation.
- A model from the Token Factory catalog.
1
Store the API key
Start
opencode and run /connect. Select Other, enter corvex as the
provider ID, and paste your sk-corvex-... key. OpenCode stores the key in
its credential store.To use an environment variable instead, skip /connect, add
"apiKey": "{env:CORVEX_API_KEY}" to options in the next step, and export
CORVEX_API_KEY before starting OpenCode.2
Add the provider configuration
Add the following configuration to OpenCode does not read context limits from the endpoint, so the configuration
declares each model’s current limit. To make GLM the default, add
opencode.json in the project root, or
to ~/.config/opencode/opencode.json for global use. The provider ID must
match the corvex value used with /connect."model": "corvex/zai-org/GLM-5.3" at the top level.3
Select and test a model
Start OpenCode in your repository and run
/models. Select a model under
Corvex Token Factory, then run a short task that exercises a tool call.
A successful response confirms the provider configuration and stored key.Output-token limit
OpenCode currently limits each step to 32,000 output tokens through its built-inOUTPUT_TOKEN_MAX. The larger limit.output values above record each model’s
Token Factory limit but do not override the OpenCode limit.
Reasoning tokens count toward the 32,000-token step budget. If a response or tool
call is truncated, retry with a shorter prompt or divide the task into smaller
steps.