mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-16 23:53:33 +08:00
#7395 made Codex (and Grok) imports store a base URL ending in /v1, but the usage script still appends a hard-coded /v1/usage, so CC Switch requests /v1/v1/usage, gets a 404 and shows "query failed" for every newly imported Codex/Grok provider. Move the script into ccswitchImport.ts and strip an existing trailing /v1 from {{baseUrl}} before appending /v1/usage, which covers both the imported value and base URLs users edit either way later.