mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-19 16:12:30 +00:00
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:
parent
23312d683e
commit
dd4def25fa
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user