--- title: "Connect Cursor to XiuRouter" description: "Configure Cursor's OpenAI base URL override for XiuRouter, verify Ask mode, and test Agent separately with the selected model." image: "https://docs.xiu.ai/og.png" --- > XiuAI 文档索引 > 完整文档索引:https://docs.xiu.ai/llms.txt > 阅读前先通过索引确认当前可用页面。 # Connect Cursor to XiuRouter Cursor can send OpenAI-family model requests to XiuRouter through its OpenAI base URL override. The override is global, so record the existing setting and test Ask before relying on Agent. ## Before you start - Update Cursor to the current stable release. - Create a dedicated XiuRouter API key for Cursor. - Select an exact OpenAI-family model ID from the current XiuRouter catalogue. - Do not add a workstation IP restriction to this key; Cursor can send requests from its own service. ## Configure the connection 1. Open **Cursor Settings → Models**. 2. Record the current OpenAI API key source and base URL when replacing an existing connection. 3. Paste the XiuRouter key into **OpenAI API Key**. 4. Turn on **Override OpenAI Base URL**. 5. Enter: ```text https://router-api.xiu.ai/v1 ``` 6. Select **Verify**. 7. Add and select the exact XiuRouter model ID in the same page. If Cursor already lists the same model ID, select that entry instead of creating a duplicate. ## What the override changes - Ask requests for eligible OpenAI-family models use `/v1/chat/completions`. - The override applies globally; Cursor does not provide a different custom provider per model. - Claude-family and Gemini-family model IDs do not use this OpenAI override. - Tab completion and features that depend on Cursor-specific models continue through Cursor's own infrastructure. - Agent depends on Cursor's streamed ApplyPatch tool. A model can answer in Ask and still fail to edit files. ## Verify in stages 1. Ask a short question in **Ask** mode. 2. In XiuRouter's request verification panel, confirm the same key, model, `/v1/chat/completions`, and successful status. 3. Ask **Agent** to inspect one file without changing it. 4. Make one small reversible edit and inspect the diff. Do not treat the **Verify** button alone as proof that Agent tools work with the selected model. ## Common failures | Symptom | Action | | --- | --- | | Key verification fails | Confirm the key is active, includes the selected model, has the correct group scope, and has available credit | | Ask works but Agent cannot edit | Update Cursor, create a new conversation, and test a model with more reliable tool calling | | Cursor's built-in models stop working | Turn off **Override OpenAI Base URL** to return those models to Cursor's routing | | XiuRouter records no matching request | Confirm the conversation was created after enabling the override and uses an eligible OpenAI-family model | ## Roll back Turn off **Override OpenAI Base URL**, restore the previous key source and model, and create a new conversation. Confirm traffic has returned to the previous route before revoking the Cursor-specific XiuRouter key. ## Sources and review date This page was checked against the current XiuRouter Cursor integration and Cursor's public model documentation on August 22, 2026. No real key was used to run a billable Cursor Agent edit during this review. 源文件:https://docs.xiu.ai/en/router/integrations/cursor/index.mdx