Skip to content

feat(volcengine-agent-plan): add Volcengine Ark Agent Plan - #7617

Open
liusencomic-cyber wants to merge 3 commits into
anomalyco:devfrom
liusencomic-cyber:feat/volcengine-agent-plan
Open

liusencomic-cyber wants to merge 3 commits into
anomalyco:devfrom
liusencomic-cyber:feat/volcengine-agent-plan

Conversation

@liusencomic-cyber

Copy link
Copy Markdown

Summary

  • add volcengine-agent-plan as an OpenAI-compatible provider at https://ark.cn-beijing.volces.com/api/plan/v3
  • 13 models, all via base_model against existing lab entries (no new lab files needed)
  • cost = 0 throughout — Agent Plan is a subscription tier (Small/Medium/Large/Max)

Follow-up to #5534, which added the volcengine-coding-plan subscription provider. Same structure, different plan surface.

Why a separate provider

Agent Plan is a subscription tier with its own base URL and its own key space. A plan key is rejected with 401 on the pay-as-you-go /api/v3 (verified 2026-09-21), and per Volcengine's warning on the coding plan, the two billing surfaces must stay distinct — this cannot be a baseURL override on the existing volcengine entry.

Model naming

Short console labels (doubao-seed-2.1-turbo, glm-5.3), which this endpoint accepts; the pay-as-you-go /api/v3 requires dated IDs and 404s on short labels. Same convention as volcengine-coding-plan.

Limits are live-measured, not copied from docs

The official plan docs disagree with the wire in several places, so every limit was probed against POST /api/plan/v3/chat/completions on 2026-09-21:

Output caps come from the exact max_tokens rejection message ("expected a value <= N"):

model docs measured
doubao-seed-2.0-mini / -lite 128K 131072
doubao-seed-2.1-turbo / -evolving 256K 262144
minimax-m3, glm-5.3, glm-5.3-flash, kimi-k3, kimi-k2.8-preview 128K 131072
kimi-k2.7-code 32K 32768
deepseek-v4-pro 384K 393216
deepseek-v4-flash / v4.1-flash 384K accepted max_tokens > 8M (not separately enforced) — lab value kept

Context caps were bisected with oversized prompts until the request failed with "Total tokens of image and text exceed max message tokens":

model docs measured (bisect)
doubao-seed-2.1-turbo 256K fails above ~229K prompt tokens → 228000
doubao-seed-evolving 1M OK at 916,875, fails by 928,750 → 916000
minimax-m3 1M OK at 1,039,437, fails by 1,043,718 → 1039000
kimi-k3 1M OK at 1,043,718 → 1043000
deepseek-v4-flash 1M OK at 1,035,156, fails by 1,039,437 → 1035000

(The >1M readings on minimax/kimi are the 1M window plus request overhead, consistent with 1_048_576 total.)

Roster & verification

  • All 13 models returned HTTP 200 on a minimal chat call (2026-09-21).
  • Roster cross-checked against the Agent Plan overview and the management-API model list (ListArkAgentPlanModel, docs).
  • bun validate passes.

Deliberately omitted

  • ark-code-latest — a console-controlled routing pointer with no stable lab model (same reasoning as feat(volcengine-coding-plan): add Volcengine Ark Coding Plan #5534). Happy to add it if maintainers prefer.
  • Non-text models (seedream/seedance/embedding/TTS/ASR) — image/video/audio endpoints, out of scope for a chat-completions provider entry.

Reasoning options

Not wire-probed on this endpoint (unlike #5534's n=4-6 per-level probing); each file mirrors the lab entry / coding-plan peer per the relay convention, and says so in a comment. kimi-k2.7-code declares reasoning_options = [] matching its coding-plan peer.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/volcengine-agent-plan/provider.toml:2 - Check: Subscription/plan providers must not share the pay-as-you-go auth env with volcengine. Why: env = ["ARK_API_KEY"] is the same key as providers/volcengine. Coding Plan deliberately uses ARK_CODING_PLAN_API_KEY so a single env does not enable both surfaces at once; this PR’s own notes say Agent Plan has a separate key space and the wrong key type fails with 401. Sharing ARK_API_KEY still lights up both providers whenever that var is set, so clients show a catalog entry that cannot work for that key. Action: Use a dedicated env (e.g. ARK_AGENT_PLAN_API_KEY) and document why it must not be ARK_API_KEY, matching volcengine-coding-plan.
  • [medium] [violation] providers/volcengine-agent-plan/models/glm-5.3.toml:15 - Check: After base_model, provider files must be override-only (no identical restated fields). Why: [limit] restates context = 1_000_000 and output = 131_072, which already match models/zhipuai/glm-5.3.toml. Same-surface peer volcengine-coding-plan omits [limit] and inherits. Action: Remove the identical [limit] block (keep cost / reasoning_options / interleaved).
  • [medium] [violation] providers/volcengine-agent-plan/models/glm-5.3-flash.toml:15 - Check: Override-only base_model files. Why: [limit] is identical to models/zhipuai/glm-5.3-flash.toml (1_000_000 / 131_072). Action: Drop the redundant [limit] section.
  • [medium] [violation] providers/volcengine-agent-plan/models/deepseek-v4.1-flash.toml:16 - Check: Override-only base_model files. Why: [limit] restates lab models/deepseek/deepseek-v4.1-flash.toml exactly (context = 1_000_000, output = 384_000) with no measured delta. Action: Remove the identical [limit] block; keep only real overrides.

- OpenAI-compatible provider at https://ark.cn-beijing.volces.com/api/plan/v3
- 13 models via base_model against existing lab entries; cost 0 (subscription)
- Limits live-measured on the plan endpoint (2026-09-21): output caps from
  max_tokens rejection messages; context caps bisected where the docs
  disagree with the wire (doubao-seed-2.1-turbo ~229K, seed-evolving ~917K)
- No /models route on this endpoint (404), so the catalog is hand-authored;
  sources and probe method documented in provider.toml
…ides identical to lab

Bot review (anomalyco#7617) action items:
- [high] env = ARK_API_KEY shared with pay-as-you-go volcengine would light
  up both providers at once; use ARK_AGENT_PLAN_API_KEY with the why-comment,
  matching volcengine-coding-plan's pattern.
- [medium] glm-5.3 / glm-5.3-flash / deepseek-v4.1-flash restated the lab
  [limit] verbatim; drop the identical blocks (override-only files).
@liusencomic-cyber
liusencomic-cyber force-pushed the feat/volcengine-agent-plan branch from c91c5b5 to 7658846 Compare September 21, 2026 06:58
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] providers/volcengine-agent-plan/models/deepseek-v4-pro.toml:105 - Check: Override-only base_model files (no restated identical lab fields; [limit] deep-merges). Why: Several models still copy lab-identical limit keys after the glm/v4.1-flash cleanup: deepseek-v4-pro context 1_000_000; deepseek-v4-flash output 384_000; doubao-seed-2.0-lite / doubao-seed-2.0-mini context 256_000; kimi-k2.7-code / kimi-k2.8-preview context 262_144 / 1_048_576; kimi-k3 output 131_072. Action: In each file, author only the limit keys that differ from the lab entry (e.g. output-only or context-only overrides).

Second bot-review pass: the remaining [limit] blocks still restated
lab-identical keys. Each file now overrides only its measured delta
(output caps from max_tokens rejections; context floors from prompt
bisection); everything else inherits from the lab.
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants