Skip to content

feat(providers): add Volcengine Ark (火山引擎) / BytePlus as built-in provider - #66266

Closed
fuleinist wants to merge 1 commit into
NousResearch:mainfrom
fuleinist:feat/volcengine-ark-provider-clean
Closed

feat(providers): add Volcengine Ark (火山引擎) / BytePlus as built-in provider#66266
fuleinist wants to merge 1 commit into
NousResearch:mainfrom
fuleinist:feat/volcengine-ark-provider-clean

Conversation

@fuleinist

@fuleinist fuleinist commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Volcengine Ark (火山引擎) / BytePlus — ByteDance's unified AI model platform — as a first-class built-in provider. Users can discover and configure it directly from Settings → Providers.

Settings → Providers → "Volcengine Ark / BytePlus (火山引擎)" → paste ARK_API_KEY → done

What's included

plugins/model-providers/volcengine-ark/__init__.py — ProviderProfile subclass + plugin.yaml manifest

  • Anthropic-compatible /api/coding endpoint via api_mode="anthropic_messages"
  • Overrides fetch_models() to return the maintained text-model list (11 models) — Ark's /models endpoint returns 124+ stale model IDs
  • Aliases: ark, volcengine, volcano, bytedance, byteplus
  • Display name includes Chinese (火山引擎) for discoverability
  • Supports both China mainland (ark.cn-beijing.volces.com) and International/BytePlus (ark.ap-southeast.bytepluses.com) endpoints
  • default_aux_model="doubao-seed-2.0-lite" — cheapest model that caches at the lowest prefix threshold (~4k)

agent/agent_runtime_helpers.py — Prompt-caching enablement

Ark serves non-Claude model families (deepseek-v4, glm-5.2, doubao-seed, kimi-k2, minimax-m3), so the blanket is_claude gate excluded them → 0% cache hits, re-billing the full prefix every turn. This adds an explicit Ark allowlist branch (provider id / host) returning native Anthropic layout — same class and fix as MiniMax's allowlist.

tests/run_agent/test_anthropic_prompt_cache_policy.py — Test coverage

  • TestVolcengineArkAnthropicWire: 6 test cases covering provider id, short alias, BytePlus alias, custom provider host match (both regions), and OpenAI-wire exclusion

Related issues

Closes #29331 — feat: add Volcengine (火山引擎) as built-in provider
Closes #40195 — Feature Request: Add official ByteDance / BytePlus ModelArk provider
Closes #51319 — Feature Request: 新增豆包 (Doubao/Volcano Engine) 作为原生 Provider

Provenance

This PR builds on #52836 (feat: add Volcengine Ark (火山引擎) as built-in provider by @david-bowiegxw), with the BytePlus (international) endpoint support added on top. The commit carries Co-authored-by: david-bowiegxw <834563048@qq.com>.

Notes

  • Follows the same pattern as the existing Fireworks AI and Vertex AI providers — plugin-native, self-contained
  • Per-model prompt-caching data is documented inline in the model list (empirical measurements from 2026-06-26)
  • Requires fix(providers): honor plugin ProviderProfile.api_mode at runtime (#53054) #53055 (fix: honor plugin ProviderProfile.api_mode at runtime) for correct anthropic_messages routing — without it, plugins whose endpoint isn't URL-self-describing degrade to chat_completions

@alt-glitch alt-glitch added type/feature New feature or request comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have needs-decision Awaiting maintainer decision before any implementation sweeper:risk-caching Sweeper risk: may break/degrade prompt caching or cache-key stability (invariant) labels Jul 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #14070: both add Volcengine/BytePlus support, but this PR uses a plugin plus the Anthropic /api/coding prompt-cache policy while #14070 is a broader direct-provider integration. Maintainers should choose or consolidate the architecture.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved (LGTM)

Overview

Adds Volcengine Ark (火山引擎) / BytePlus as a built-in provider. +199/0, 4 files.

Security

  • No hardcoded secrets or credentials

Code Quality

  • Clean provider integration
  • Proper API key/credential handling for the new provider

Looks Good

  • Well-scoped provider addition
  • Consistent with existing provider patterns

Reviewed by Hermes Agent

@david-bowiegxw

Copy link
Copy Markdown

Glad to see continued interest in getting Ark support landed — and the BytePlus/International endpoint is a genuinely useful addition. That said, this PR needs an attribution fix before it goes further:

This diff is my patch from #52836, opened 2026-06-26 and closed 2026-07-15 by the automated sweeper (appeal pending in that thread). Apart from the BytePlus layer — the byteplus alias, the ark.ap-southeast.bytepluses.com host, a few docstring lines, and two tests following the same pattern — the two patches are line-for-line identical. That includes the 102-line provider profile, the prompt-cache allowlist hunk in agent_runtime_helpers.py, the test suite, the per-model cache annotations from my 2026-06-26 empirical measurements, and the default_aux_model selection rationale. Anyone can verify:

gh pr diff 52836 > a.patch && gh pr diff 66266 > b.patch && diff a.patch b.patch

@fuleinist you commented "+1 on this" on #52836, so you know the provenance — but this PR's single commit carries only your authorship, with no Co-authored-by and no reference to #52836 anywhere. MIT permits reuse; contributor norms still require credit. Please:

  1. Add to the commit message: Co-authored-by: david-bowiegxw <834563048@qq.com>
  2. Note in the PR body that this builds on feat: add Volcengine Ark (火山引擎) as built-in provider #52836, with the BytePlus support added on top.

I have no objection to this PR carrying the work forward with that fixed — shipping the feature matters more than who opens the PR, and the BytePlus extension is a real improvement.

One heads-up for maintainers: #52836 was closed under the in-tree-provider-integration policy, and this PR is the same in-tree shape, so it presumably faces the same call. My appeal in #52836 argues that policy doesn't cover model providers (AGENTS.md's own text plus the post-policy Vertex #56363 and Fireworks merges). It would make sense to resolve the policy question and this PR together rather than separately — whichever way it goes, the authorship record should reflect where the patch came from.

…vider

Adds Volcengine Ark (火山引擎) — ByteDance's unified AI model platform —
as a first-class built-in provider. Users can discover and configure it
directly from Settings → Providers.

What's included:

plugins/model-providers/volcengine-ark/__init__.py:
  - ProviderProfile subclass with hardcoded model list (11 models)
  - Anthropic-compatible /api/coding endpoint via api_mode="anthropic_messages"
  - Overrides fetch_models() to return the maintained text-model list
  - Aliases: ark, volcengine, volcano, bytedance, byteplus
  - Supports both China mainland (volces.com) and International/BytePlus
    (bytepluses.com) endpoints
  - default_aux_model=doubao-seed-2.0-lite (cheapest caching model)

agent/agent_runtime_helpers.py:
  - Anthropic prompt-caching enablement for Ark's /api/coding endpoint
  - Matches on provider id (volcengine-ark, ark, volcengine, byteplus)
    or host (ark.cn-beijing.volces.com, ark.ap-southeast.bytepluses.com)
  - Same class and fix as MiniMax's allowlist — native Anthropic layout

tests/run_agent/test_anthropic_prompt_cache_policy.py:
  - TestVolcengineArkAnthropicWire: 6 test cases covering provider id,
    short alias, BytePlus alias, custom provider host match (both regions),
    and OpenAI-wire exclusion

Co-authored-by: david-bowiegxw <834563048@qq.com>

Closes NousResearch#29331, NousResearch#40195, NousResearch#51319
@fuleinist
fuleinist force-pushed the feat/volcengine-ark-provider-clean branch from 3a30fff to 82f1e3c Compare July 17, 2026 13:42
@fuleinist

fuleinist commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@david-bowiegxw — thank you for the call-out, I've fixed both issues:

  1. Commit amended with Co-authored-by: david-bowiegxw <834563048@qq.com> — the commit message now carries proper attribution for the feat: add Volcengine Ark (火山引擎) as built-in provider #52836 patch.
  2. PR body updated with a Provenance section explicitly noting this builds on feat: add Volcengine Ark (火山引擎) as built-in provider #52836 with BytePlus support added on top.

The diff now shows the correct author email (noreply.github.com) and the Co-authored-by trailer. Apologies for the oversight — the BytePlus extension was the delta I should have highlighted from the start, and I should have carried the attribution forward when branching from your work.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for carrying forward the Ark work, adding the BytePlus endpoint, and preserving the prior contributor attribution.

This automated hermes-sweeper review is closing this under the standing in-tree-provider-integration policy:

  • The PR adds a new third-party LLM provider under plugins/model-providers/volcengine-ark/ (commit 82f1e3c903b36624623df40b7cc41cb083035d23).
  • The policy requires vendor/provider integrations of this kind to ship as standalone plugins installed into ~/.hermes/plugins/, rather than adding an in-tree provider plugin.
  • The standalone plugin can retain the provider profile, model catalog, BytePlus endpoint support, and cache-policy work, while avoiding a permanent core-tree maintenance commitment.

Please consider publishing the provider as a standalone plugin repository and sharing it in #plugins-skills-and-skins.


Closed as not-planned per standing maintainer policy (in-tree-provider-integration). This is a design-direction decision, not a code-quality judgment — see the Contribution Rubric in AGENTS.md for what the project is looking for. If you believe this policy was misapplied to your change, comment here and a maintainer will take a look.

@teknium1 teknium1 closed this Jul 18, 2026
@teknium1 teknium1 added the sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) label Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/plugins Plugin system and bundled plugins needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) sweeper:risk-caching Sweeper risk: may break/degrade prompt caching or cache-key stability (invariant) type/feature New feature or request

Projects

None yet

5 participants