fix(providers): set supports_max_completion_tokens for VolcEngine providers

VolcEngine's OpenAI-compatible gateway rejects requests when both
max_tokens and max_completion_tokens are present (the latter added
by openai-python SDK v2.x serialization). Set the flag so nanobot
sends max_completion_tokens instead of max_tokens for volcengine,
volcengine_coding_plan, and by extension byteplus variants.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Albert Wang 2026-05-11 15:39:54 +08:00 committed by Xubin Ren
parent 23312d683e
commit dd4def25fa

View File

@ -192,6 +192,7 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
detect_by_base_keyword="volces",
default_api_base="https://ark.cn-beijing.volces.com/api/v3",
thinking_style="thinking_type",
supports_max_completion_tokens=True,
),
# VolcEngine Coding Plan (火山引擎 Coding Plan): same key as volcengine
@ -205,6 +206,7 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
default_api_base="https://ark.cn-beijing.volces.com/api/coding/v3",
strip_model_prefix=True,
thinking_style="thinking_type",
supports_max_completion_tokens=True,
),
# BytePlus: VolcEngine international, pay-per-use models