Skip to content

feat(providers): add Volcengine Ark Agent Plan / Coding Plan presets - #685

Open
kuzen-so wants to merge 1 commit into
vastsa:mainfrom
kuzen-so:feat/ark-plan-presets
Open

kuzen-so wants to merge 1 commit into
vastsa:mainfrom
kuzen-so:feat/ark-plan-presets

Conversation

@kuzen-so

Copy link
Copy Markdown
Contributor

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:

Plan Protocol Base URL
Coding Plan Anthropic https://ark.cn-beijing.volces.com/api/coding
Coding Plan OpenAI https://ark.cn-beijing.volces.com/api/coding/v3
Agent Plan Anthropic https://ark.cn-beijing.volces.com/api/plan
Agent Plan OpenAI https://ark.cn-beijing.volces.com/api/plan/v3

Calling plan models (e.g. ark-code-latest) through /api/v3 does 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) and volcengine-coding-plan-openai / volcengine-agent-plan-openai (chat_completions). All plan rows keep the shared volcengine vendor 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_URLS maps the four plan hosts to the volcengine catalog provider, so a plan row still inherits Doubao-family metadata.
  • i18n labels for the four presets in all 8 locales.
  • Preset list updated in docs/spec/03-runtime/12-provider-config-schema.md (+ zh-CN).
  • New tests covering plan-vs-standard URL matching and the shared vendor key.

Verification

  • pnpm --filter @pi-desktop/shared test — 437 passed
  • pnpm --filter @pi-desktop/shared typecheck — clean
  • pnpm --filter @pi-desktop/i18n test — 25 passed (catalog key parity enforced)
  • pnpm --filter @pi-desktop/agent-runtime test — 626 passed
  • Desktop provider/catalog suites (models-dev-catalog, provider-model-config, service-picker, provider-api-style, provider-catalog-runtime, provider-copy, provider-form-layout, model-binding-catalog-source) — 88 passed
  • pnpm lint, pnpm docs:check — clean

Note: pnpm --filter @pi-desktop/desktop typecheck reports one pre-existing error in electron/main/user-login-path.ts that also fails on a clean main checkout; it is unrelated to this change.

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)
@kuzen-so kuzen-so closed this Sep 20, 2026
@kuzen-so kuzen-so reopened this Sep 20, 2026
@kuzen-so kuzen-so closed this Sep 20, 2026
@kuzen-so kuzen-so reopened this Sep 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant