OpenCode includes a built-in LongCat provider. After authenticating with an API key, you can select LongCat-2.5; a configuration file can also be used to control thinking mode.
Suitable tasks: Connecting LongCat-2.5 in OpenCode to handle programming tasks.
Unsuitable tasks: Assessing the model's programming performance or inferring configuration for other clients based on the connection instructions.
Applicable model version: LongCat-2.5.
Applicable client, agent, or API: OpenCode CLI; the official model table lists OpenAI / Anthropic API formats.
Recommended reasoning level and parameters: Thinking mode is enabled by default; the example shows how to disable it. No other recommended parameters are provided.
After authentication, you can use the built-in provider without manually configuring the endpoint. To disable thinking mode, create or edit opencode.json in the OpenCode configuration directory:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"longcat": {
"models": {
"LongCat-2.5": {
"options": {
"thinking": {
"type": "disabled"
}
}
}
}
}
}
}Change disabled to enabled to turn on thinking mode. The configuration directory is ~/.config/opencode/ on macOS / Linux, and .config\opencode under the user directory on Windows.
Install the OpenCode CLI, for example by running npm i -g opencode-ai.
Run opencode auth login, select LongCat from the provider list, and enter your own API key when prompted. If LongCat is not listed, upgrade OpenCode first.
Set up the opencode.json above if needed; without changes, the default thinking mode is used.
Run opencode, switch to LongCat-2.5 with /models, then enter a task.
The official documentation lists LongCat-2.5 as a model supported by OpenCode, with OpenAI / Anthropic API formats.
The documentation says the built-in LongCat provider comes preconfigured with the endpoint and model list; manual configuration is not needed after authentication.
thinking supports {"type":"enabled"} and {"type":"disabled"} and is enabled by default. The source provides no programming performance test data.
This is an official connection guide, not an independent performance evaluation. Configuration and the provider list may change across versions; check the source before use. Users enter their own API key during authentication; it should not be included in this article or shared configuration.
Follow the official OpenCode documentation to install, authenticate, and select the model, then validate it with your own programming tasks. This article did not execute an API call.
LongCat 2.5