--- title: "Connect Continue to XiuRouter" description: "Save a local secret, add a Continue model, and verify Chat Completions without replacing existing models or roles." image: "https://docs.xiu.ai/og.png" --- > XiuAI documentation index > Full documentation index: https://docs.xiu.ai/en/llms.txt > Check the index for current pages before reading. # Connect Continue to XiuRouter Save a local secret and add a XiuRouter model to `config.yaml`. If the file already has models and roles, keep them and append a new entry. This guide explicitly uses Chat Completions to avoid automatic Responses routing for some `gpt-5` model names. ## Choose a setup method - First setup: save the secret, then add a model entry. - Existing setup: retain the original models and roles, append XiuRouter, then switch. - Chat-assisted setup: an agent can merge credential-free YAML, but you must save the secret, restart, and create a new task. ## Before you start Continue's extension or CLI must be able to read its configuration, and you need a dedicated XiuRouter key. ## Save the local secret The IDE extension does not read an `export` from an unrelated terminal. Save the key in an `.env` file Continue can read, such as: ```dotenv # ~/.continue/.env XIUROUTER_API_KEY=YOUR_XIUROUTER_API_KEY ``` You can also use a workspace-root `.env` or `.continue/.env`. Keep these files out of Git and restart the IDE after changing them. ## Add a model Merge this into the active Continue `config.yaml`: ```yaml name: Local Config version: 1.0.0 schema: v1 models: - name: XiuRouter provider: openai model: YOUR_MODEL_ID apiBase: https://router-api.xiu.ai/v1 apiKey: ${{ secrets.XIUROUTER_API_KEY }} useResponsesApi: false ``` If `name`, `version`, `schema`, or `models` already exist, append only the model entry. Do not replace other providers or roles or put a real key in committable project configuration. An agent with configuration-file access can merge this credential-free YAML. You still save the secret in the appropriate `.env`, restart the IDE, and start a new task. ## Ask an agent to help After saving the secret yourself, send this to a Continue agent with configuration access: > Keep the current `config.yaml` name, version, models, and roles. Append a XiuRouter model using `provider: openai`, Base URL `https://router-api.xiu.ai/v1`, model `YOUR_MODEL_ID`, and `useResponsesApi: false`. Reference only `secrets.XIUROUTER_API_KEY`; do not read or write the real credential. Show the diff afterward. ## Verify 1. Reload the Continue configuration. 2. Select the `XiuRouter` model. 3. Ask it to explain a file without editing. 4. Complete one small, reversible edit. 5. Verify the key, model, `/v1/chat/completions`, and successful result in XiuRouter's request inspection view. Chat, Edit, Apply, Autocomplete, and Embed can use different models. This configures one OpenAI-compatible model; configure other roles separately for their protocols and capabilities. Continue defaults some `gpt-5` and o-series models to Responses. Keep `useResponsesApi: false` for this Chat Completions walkthrough. Before removing it, verify `/v1/responses` support for the model and service group. ## Troubleshoot | Symptom | Next step | | --- | --- | | Configuration not loaded | Find the `config.yaml` your installed Continue version actually reads | | `401` | Check the `.env` secret name, key validity, and restart the IDE | | Model unavailable | Copy its exact ID from `/v1/models` and check key/group restrictions | | Chat configuration looks right but requests fail | Inspect whether the actual request uses Chat Completions or Responses and check model compatibility | | Chat works but Edit or Apply fails | Choose a verified model for that role; one Chat response does not establish every role's compatibility | ## Roll back Remove the XiuRouter entry from `models`, reload, and select the original model. Revoke the test key once no Continue configuration references it. ## Sources and review date Reviewed on 2026-08-31. This translation preserves that date. Basic setup requires a complete reply and matching successful request record. Source: https://docs.xiu.ai/en/router/integrations/continue/index.mdx