Skip to main content
OpenCode connects to NagaAI as a custom provider. Put this in ~/.config/opencode/opencode.json, or in opencode.json in a project:
Export NAGAAI_API_KEY before you start opencode, or run /connect, choose Other, enter nagaai as the provider id and paste the key.
  • @ai-sdk/openai-compatible uses Chat Completions. To use Responses for one model, add "provider": { "npm": "@ai-sdk/openai" } inside that model’s entry.
  • Every model needs limit: OpenCode has no metadata for custom providers. Take context from context_window in /v1/models. The catalog has no output limit, so choose a value the model accepts.
  • Only models listed under models appear in the model picker.