Skip to content

Use OpenCode with STACKIT AI Model Serving

Last updated on

OpenCode is an open-source AI coding assistant that runs in your terminal. It provides intelligent code completions, explanations, and refactoring suggestions powered by various LLM providers. STACKIT AI Model Serving is available as an official built-in provider in OpenCode, allowing you to use STACKIT’s hosted models directly in your development workflow.

For installation and system requirements, refer to the OpenCode documentation.

To authenticate with STACKIT AI Model Serving, you need to create an auth token. Refer to Manage auth tokens to create your token in the STACKIT Portal.

Configure OpenCode to use STACKIT AI Model Serving

Section titled “Configure OpenCode to use STACKIT AI Model Serving”

Refer to the OpenCode STACKIT Provider documentation for configuration steps. You will need your STACKIT AI Model Serving Auth Token during the setup.

See Available Shared Models for the complete list of available models.

If you receive authentication errors:

  1. Verify your auth token is still valid (tokens expire based on the ttlDuration set during creation)
  2. Run /connect again and re-enter your token
  3. Ensure you have access to the STACKIT project

If OpenCode cannot connect to STACKIT:

  1. Check your network connection and firewall settings
  2. Ensure the STACKIT AI Model Serving API is accessible from your network
  3. Verify your auth token has not expired

If you receive “model not found” errors:

  1. Run /models to see the current list of available models
  2. Check Available Shared Models for the current model catalog
  3. Some models may have been updated or deprecated