fix(copilot): default SIM_AGENT_API_URL to www.copilot.sim.ai#4700
Conversation
…d redirect path drop
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 4391bfb. Configure here. |
Greptile SummaryThis PR changes the default copilot backend URL (
Confidence Score: 5/5This is a safe, one-line string change to a well-guarded constant; the env-override fallback is untouched and the The only changed line is the default URL value. All env-override and validation logic in the same file is unmodified, and the fix directly addresses a documented LB redirect issue by targeting the canonical No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Next.js as Next.js (sim)
participant LB as Load Balancer
participant Backend as Copilot Backend
Note over Client,Backend: Before fix (bare domain)
Client->>Next.js: POST /api/copilot
Next.js->>LB: POST https://copilot.sim.ai/api/copilot
LB-->>Next.js: 301 Redirect → https://www.copilot.sim.ai (path dropped)
Next.js-->>Client: Request fails / path lost
Note over Client,Backend: After fix (www subdomain)
Client->>Next.js: POST /api/copilot
Next.js->>LB: POST https://www.copilot.sim.ai/api/copilot
LB->>Backend: POST /api/copilot (path preserved)
Backend-->>Client: 200 OK
Reviews (1): Last reviewed commit: "fix(copilot): default SIM_AGENT_API_URL ..." | Re-trigger Greptile |
Summary
SIM_AGENT_API_URL_DEFAULTfromhttps://copilot.sim.aitohttps://www.copilot.sim.aito avoid the LB redirect that drops the request path (e.g./api/copilot)SIM_AGENT_API_URLType of Change
Testing
Tested manually
Checklist