Conversation
The built-in Volcengine Ark preset only covers the standard pay-as-you-go endpoint (https://ark.cn-beijing.volces.com/api/v3). Ark's subscription plans are served from dedicated hosts with their own protocol variants: - Coding Plan: anthropic_messages at /api/coding, chat_completions at /api/coding/v3 - Agent Plan: anthropic_messages at /api/plan, chat_completions at /api/plan/v3 Calling plan models through /api/v3 does not consume plan quota and bills pay-as-you-go instead, so the plans need first-class presets. Add four named endpoint presets (Coding Plan / Agent Plan, each in an Anthropic and an OpenAI variant). All plan rows keep the shared `volcengine` vendor key so models.dev metadata still resolves; the stored base URL distinguishes the preset, and presetByUrl() now maps the plan paths back to their preset. KNOWN_PROVIDER_BASE_URLS maps the plan hosts to the volcengine catalog provider. Refs: - https://www.volcengine.com/docs/82379/1928261 (Coding Plan quickstart) - https://www.volcengine.com/activity/agentplan (Agent Plan)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The built-in Volcengine Ark preset only covers the standard pay-as-you-go endpoint
https://ark.cn-beijing.volces.com/api/v3. Ark's subscription plans (Agent Plan / Coding Plan) are served from dedicated hosts with their own protocol variants:https://ark.cn-beijing.volces.com/api/codinghttps://ark.cn-beijing.volces.com/api/coding/v3https://ark.cn-beijing.volces.com/api/planhttps://ark.cn-beijing.volces.com/api/plan/v3Calling plan models (e.g.
ark-code-latest) through/api/v3does not consume plan quota and bills pay-as-you-go instead, so the plans need first-class presets — today users must hand-configure a custom endpoint and know the correct protocol/URL pairing.Refs:
Change
packages/shared/src/provider-presets.ts: four new named endpoint presets —volcengine-coding-plan/volcengine-agent-plan(anthropic_messages) andvolcengine-coding-plan-openai/volcengine-agent-plan-openai(chat_completions). All plan rows keep the sharedvolcenginevendor key so models.dev metadata still resolves; the stored base URL distinguishes the preset on a saved row.presetByUrl()now maps the plan paths back to their preset, mirroring the existing bigmodel.cn / z.ai handling.apps/desktop/electron/main/models-dev-catalog.ts:KNOWN_PROVIDER_BASE_URLSmaps the four plan hosts to thevolcenginecatalog provider, so a plan row still inherits Doubao-family metadata.docs/spec/03-runtime/12-provider-config-schema.md(+ zh-CN).Verification
pnpm --filter @pi-desktop/shared test— 437 passedpnpm --filter @pi-desktop/shared typecheck— cleanpnpm --filter @pi-desktop/i18n test— 25 passed (catalog key parity enforced)pnpm --filter @pi-desktop/agent-runtime test— 626 passedmodels-dev-catalog,provider-model-config,service-picker,provider-api-style,provider-catalog-runtime,provider-copy,provider-form-layout,model-binding-catalog-source) — 88 passedpnpm lint,pnpm docs:check— cleanNote:
pnpm --filter @pi-desktop/desktop typecheckreports one pre-existing error inelectron/main/user-login-path.tsthat also fails on a cleanmaincheckout; it is unrelated to this change.