feat(volcengine): add Volcano Engine (Doubao/Ark) provider support#892
Closed
dvrd wants to merge 15 commits intoRightNow-AI:mainfrom
Closed
feat(volcengine): add Volcano Engine (Doubao/Ark) provider support#892dvrd wants to merge 15 commits intoRightNow-AI:mainfrom
dvrd wants to merge 15 commits intoRightNow-AI:mainfrom
Conversation
添加火山引擎(Doubao)和火山引擎编码计划作为新的AI提供商支持,包括: - 在多个文件中添加VOLCENGINE_API_KEY环境变量配置 - 添加volcengine和volcengine_coding提供商信息 - 更新模型目录添加火山引擎相关模型
更新模型目录中的火山引擎编码计划模型,增加新模型并调整现有模型的参数
将火山引擎相关配置移至列表更靠前的位置,并确保其配置完整
…vider Updated the display name for the Volcano Engine provider across multiple files to remove the "(Doubao)" suffix for consistency.
- Rename doubao-seed-code under volcengine_coding provider to doubao-seed-code-ark to eliminate ambiguous model ID lookup - Add comment marking third-party Ark marketplace models in catalog - Guard empty env vars in launcher.rs and welcome.rs detect_provider() using .ok().filter(|v| !v.is_empty()).is_some() instead of .is_ok() - Add volcengine and volcengine_coding to unknown-provider error message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… provider tests - Prefix ark-marketplace models with "ark/" to avoid ID collision with native minimax, zhipu, and moonshot provider entries (FIX 1) - Add comment explaining dot vs hyphen separator difference between volcengine_coding (coding/v3) and volcengine (v3) endpoints (FIX 2) - Include "doubao" alias in unknown-provider error message (FIX 3) - Add "volcengine" probe to detect_available_provider() (FIX 4) - Add test_provider_defaults_volcengine, _doubao_alias, and _volcengine_coding tests (FIX 5) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add display field to ProviderInfo in wizard.rs; all providers now show human-readable names (e.g. "Volcano Engine" / "Volcano Engine (Coding)") instead of raw identifiers - Swap volcengine/volcengine_coding order to match init_wizard.rs and catalog - Document "doubao" dual-alias intent in runtime model_catalog.rs - Document cn-beijing regional hardcoding with base_url override note - Document zero pricing for Ark-routed third-party models Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…as comment - Swap volcengine/volcengine_coding probe order in detect_available_provider so the general volcengine provider is auto-selected when VOLCENGINE_API_KEY is set - Align volcengine_coding display name to "Volcano Engine (Coding Plan)" in both init_wizard.rs and wizard.rs - Add sync-warning comment on the doubao alias in model_catalog.rs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… and add wizard hints
volcengine_coding shares the same VOLCENGINE_API_KEY as volcengine, making it
permanently unreachable in auto-detection. Remove it from PROBE_ORDER so only
volcengine is auto-detected; volcengine_coding remains selectable via the wizard.
Also add descriptive hints for both volcengine entries in the init wizard
("ByteDance Ark platform" / "ByteDance Ark — coding models").
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… fix provider order Move ark/ prefix to aliases so catalog lookups still resolve but the bare model name is forwarded to the Ark API (which rejects the prefix). Also reorder volcengine before volcengine_coding in provider_list(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
strip_provider_prefix now removes the ark/ prefix so that model IDs like ark/minimax-m2.5 are sent as minimax-m2.5 to the Ark API. Also extends test_ark_alias_resolution to cover find_model paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously strip_provider_prefix stripped the ark/ prefix for all providers, which could corrupt model IDs from other providers. Now the strip only fires when provider is "volcengine" or "volcengine_coding". Also adds two unit tests verifying the guarded and unguarded cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tend tests - Add "doubao" to the ark/ prefix strip condition in agent_loop.rs so users with provider = "doubao" get correct model IDs sent to the API - Add two new tests: volcengine and doubao ark/ stripping - Update volcengine wizard hints with region info (cn-beijing) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The four Ark marketplace models under volcengine_coding had bare IDs (minimax-m2.5, glm-4.7, deepseek-v3.2, kimi-k2.5) that collided with native provider entries. Since find_model does a linear scan returning the first match, ark/ lookups were resolving to the wrong provider. Fix: make ark/ the canonical ID for each colliding entry, keeping the bare name as an alias only for deepseek-v3.2 (no collision exists there). Update test_ark_alias_resolution to assert on the new canonical ark/ IDs and verify native provider entries remain unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Closing — PR should target dvrd/openfang instead. |
sergiocamaramadrid-cyber
approved these changes
Mar 29, 2026
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.
Summary
volcengineandvolcengine_codingproviders backed by ByteDance's Ark API (ark.cn-beijing.volces.com)Changes
Core
openfang-types:VOLCENGINE_BASE_URL+VOLCENGINE_CODING_BASE_URLconstantsopenfang-runtime/drivers/mod.rs: provider defaults, known providers, auto-detect probeopenfang-runtime/model_catalog.rs: 12 models across two providers;ark/namespace for Ark marketplace models to avoid ID collisions with native providers (minimax, zhipu, moonshot, deepseek)openfang-runtime/agent_loop.rs:strip_provider_prefixstripsark/catalog namespace before sending to Ark API (Ark expects bare model names on the wire)TUI / CLI
init_wizard.rs+wizard.rs: both providers added with hints and correct env varlauncher.rs+welcome.rs:VOLCENGINE_API_KEYdetectionmain.rs: provider list, key validation, model fetchBug fixes caught during review
ark/canonical namespace!v.is_empty()) applied consistentlyvolcengine_codingremoved from auto-detect probe (shares key withvolcengine; coding plan must be chosen explicitly)ark/stripping gated to volcengine providers only (not unconditional)DASHSCOPE_API_KEY), HuggingFace (HF_API_KEY), Replicate (REPLICATE_API_TOKEN), Cohere (COHERE_API_KEY)Tests
test_provider_defaults_volcengine/test_provider_defaults_volcengine_codingtest_ark_alias_resolution— verifiesark/minimax-m2.5etc. resolve correctlytest_doubao_alias_resolves_to_volcengine_modeltest_strip_ark_catalog_prefix_for_volcengine_coding+ negative case for non-volcengine providersCloses #873