Continue Relay Integration Tutorial: Practical Guide to Custom VS Code Providers

  • 发布时间
  • 语言en

Continue extension integration tutorial: Add custom providers in config.yaml, configure your Base URL and sk- key, and unify your Claude / GPT / Gemini workflows.

1. What is Continue?

Continue is an open-source, free AI coding extension for VS Code that supports configuring multiple custom providers. By pointing the provider to our gateway, you can call Claude, GPT, and Gemini models under a unified billing system.

2. Preparation

  1. Log in to the Jizhi API console and create an sk-xxxxxx API Key (it will be displayed only once, so please save it).
  2. Confirm the model slug you wish to use (e.g., claude-sonnet-5, gpt-5.5, gemini-3.7-flash).
  3. Confirm the gateway address: https://www.relay-api.com.

3. Configure Continue

Edit ~/.continue/config.yaml (or .continue/config.yaml) and add a provider for each model:

models:
  - title: Claude Sonnet 5
    provider: anthropic
    model: claude-sonnet-5
    apiBase: "https://www.relay-api.com"
    apiKey: sk-your-key
  - title: GPT-5.4
    provider: openai
    model: gpt-5.5
    apiBase: "https://www.relay-api.com/v1"
    apiKey: sk-your-key
  - title: Gemini 3.7 Flash
    provider: gemini
    model: gemini-3.7-flash
    apiBase: "https://www.relay-api.com"
    apiKey: sk-your-key

After saving, restart the extension and use /models to switch between models.

4. API Endpoint Reference

Model GroupGateway Entry (apiBase)Protocol
Claude / Anthropichttps://www.relay-api.comAnthropic Messages
GPT / OpenAIhttps://www.relay-api.com/v1OpenAI Chat Completions
Geminihttps://www.relay-api.comGoogle generateContent

5. Troubleshooting Common Issues

IssueSolution
401 / 403Invalid key, disabled, or insufficient balance; verify the sk- key is correct and check your balance.
404 / Model UnavailableModel name does not match the platform slug, or the model is not enabled; verify the model ID.

Security Tip: Do not commit your API keys to public repositories. Generative tasks consume tokens quickly, so keep an eye on your balance.

Note on Base URL: Our site accepts both /v1beta/models/... and /v1beta/v1beta/models/... (as well as /v1/... and /v1/v1/...). Therefore, regardless of whether your client appends /v1beta automatically, using https://www.relay-api.com or https://www.relay-api.com/v1beta as the Base URL will work correctly. After configuration, click Connect / Test in Continue; if you still receive a 404, verify that the model ID matches the "Model ID" found in the top-right corner of the "Tokens" page in the console.