OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up here, create your API key on the keys page, and then choose a model from the list of supported models. Change ~/.continue/config.json to look like the following.
config.yaml
models:
  - name: OpenRouter LLaMA 70 8B
    provider: openrouter
    model: meta-llama/llama-3-70b-instruct
    apiBase: https://openrouter.ai/api/v1
    apiKey: <YOUR_OPEN_ROUTER_API_KEY>
To utilize features such as provider preferences or model routing configuration, include these parameters inside the models[].requestsOptions.extraBodyProperties field of your plugin config. For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so:
config.yaml
models:
  - name: Example Model
    provider: exampleProvider
    model: example-model
    requestOptions:
      extraBodyProperties:
        transforms: []
Learn more about available settings here.

Model Capabilities

OpenRouter models may require explicit capability configuration because the proxy doesn’t always preserve the original model’s function calling support.
Continue automatically uses system message tools for models that don’t support native function calling, so Agent mode should work even without explicit capability configuration. However, you can still override capabilities if needed.
If you’re experiencing issues with Agent mode or tools not working, you can add the capabilities field:
config.yaml
models:
  - name: Claude via OpenRouter
    provider: openrouter
    model: anthropic/claude-3.5-sonnet
    apiBase: https://openrouter.ai/api/v1
    apiKey: <YOUR_OPEN_ROUTER_API_KEY>
    capabilities:
      - tool_use      # Enable function calling for Agent mode
      - image_input   # Enable image upload support
Note: Not all models support function calling. Check the OpenRouter models page for specific model capabilities.