Skip to main content
Create an API key in the developer console. Choose a model ID from the catalog. OpenCode needs a provider entry because Nito’s models are outside OpenCode’s built-in list.

Configure the provider

Put the key in the environment of the shell that starts OpenCode:
Save the JSON in ~/.config/opencode/opencode.json for your own sessions, or in the project’s opencode.json when the project owns this provider definition. The key stays in NITO_API_KEY; the project file contains only its environment-variable reference. The npm adapter uses Chat Completions, so baseURL ends at /v1 rather than /v1/chat/completions.

Check the route

Start OpenCode and select nito/moonshotai/kimi-k3 from /models. Ask for a one-sentence reply, then try a small edit that uses OpenCode’s tools. The nito/ prefix is OpenCode’s provider ID; Nito receives moonshotai/kimi-k3. Add another catalog ID as a key under models before selecting it. For Confidential inference, add the exact :confidential catalog ID as a separate model entry. OpenCode’s provider configuration does not implement the client-side encryption required for Encrypted inference.

Troubleshooting

  • If Nito is absent from /models, check the config file location and JSON syntax, then restart OpenCode.
  • If the model appears but authorization fails, confirm NITO_API_KEY is exported in the process that launched OpenCode. A project config file does not set that variable for you.
  • If the endpoint returns 404, check that baseURL ends in /v1 and that the model key matches a catalog ID exactly.
  • If text works but edits fail, choose a catalog model whose supported_parameters includes tools. Check the live catalog.
OpenCode’s custom-provider guide documents the config fields and environment-variable syntax.