fix(presets): fix Volcengine Ark Agent Plan default endpoint from /api/coding to /api/plan#4604
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d077e37b79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| settingsConfig: { | ||
| env: { | ||
| ANTHROPIC_BASE_URL: "https://ark.cn-beijing.volces.com/api/coding", | ||
| ANTHROPIC_BASE_URL: "https://ark.cn-beijing.volces.com/api/plan", |
There was a problem hiding this comment.
Accept the new Volcengine plan path in usage detection
When this preset is added or queried with the new /api/plan base URL, the token-plan plumbing no longer recognizes it as Volcengine: the frontend detector in src/config/codingPlanProviders.ts and the backend detect_provider in src-tauri/src/services/coding_plan.rs still match only volces.com/api/coding. That means the Claude preset will not auto-inject the token_plan usage script, and any existing/manual Volcengine usage query with this new default returns Unknown coding plan provider; please update the detectors to accept the new plan path as well.
Useful? React with 👍 / 👎.
| config: generateThirdPartyConfig( | ||
| "ark_agentplan", | ||
| "https://ark.cn-beijing.volces.com/api/coding/v3", | ||
| "https://ark.cn-beijing.volces.com/api/plan/v3", |
There was a problem hiding this comment.
Update the stale Codex preset test fixture
This URL change leaves tests/config/codexChatProviderPresets.test.ts expecting the old /api/coding/v3 value for 火山Agentplan. I ran pnpm vitest run tests/config/codexChatProviderPresets.test.ts, and it fails at the base URL assertion with expected https://ark.cn-beijing.volces.com/api/coding/v3 but received https://ark.cn-beijing.volces.com/api/plan/v3, so the targeted Vitest suite/CI remains red until that fixture is updated.
Useful? React with 👍 / 👎.
Problem
The default API endpoint for the "火山Agentplan" (Volcengine Ark Agent Plan) preset is incorrectly set to
https://ark.cn-beijing.volces.com/api/coding, which causes API errors when users use the default configuration.The correct endpoint should be
https://ark.cn-beijing.volces.com/api/plan.Changes
1. Updated default API endpoint for 火山Agentplan preset across all supported apps
ANTHROPIC_BASE_URL/api/coding→/api/planbaseUrl/api/coding→/api/planbase_urlandendpointCandidates/api/coding/v3→/api/plan/v3baseURL/api/coding/v3→/api/plan/v3baseUrl/api/coding/v3→/api/plan/v3base_url/api/coding→/api/plan2. Updated coding plan provider detection to accept the new
/api/planpathsrc/config/codingPlanProviders.ts: Updated regex from/volces\.com\/api\/coding/ito/volces\.com\/api\/(coding|plan)/iso the frontend correctly identifies the new endpoint as a Volcengine coding plan provider and auto-injects thetoken_planusage script.src-tauri/src/services/coding_plan.rs: Updateddetect_providerto match bothvolces.com/api/codingandvolces.com/api/planso the Rust backend correctly routes usage queries to the Volcengine provider.3. Updated test fixture
tests/config/codexChatProviderPresets.test.ts: Updated expected baseUrl from/api/coding/v3to/api/plan/v3to match the corrected preset.Note: The BytePlus international preset (
ark.ap-southeast.bytepluses.com/api/coding) and the DouBaoSeed pay-as-you-go presets remain unchanged.