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:
# ~/.continue/.env
XIUROUTER_API_KEY=YOUR_XIUROUTER_API_KEYYou 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:
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: falseIf 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.yamlname, version, models, and roles. Append a XiuRouter model usingprovider: openai, Base URLhttps://router-api.xiu.ai/v1, modelYOUR_MODEL_ID, anduseResponsesApi: false. Reference onlysecrets.XIUROUTER_API_KEY; do not read or write the real credential. Show the diff afterward.
Verify
- Reload the Continue configuration.
- Select the
XiuRoutermodel. - Ask it to explain a file without editing.
- Complete one small, reversible edit.
- 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.