fix(providers): make max_tokens and max_completion_tokens mutually exclusive (#2491)

* fix(providers): make max_tokens and max_completion_tokens mutually exclusive

* docs: document supports_max_completion_tokens ProviderSpec option
This commit is contained in:
Flo authored and Xubin Ren committed 2026-03-27 21:19:23 +08:00
1 parent ace3fd6049
commit 1331084873
3 files changed
+7 -2

No files matched your search

+1
View File
@@ -1157,6 +1157,7 @@ That's it! Environment variables, model routing, config matching, and `nanobot s
| `detect_by_key_prefix` | Detect gateway by API key prefix | `"sk-or-"` |
| `detect_by_base_keyword` | Detect gateway by API base URL | `"openrouter"` |
| `strip_model_prefix` | Strip provider prefix before sending to gateway | `True` (for AiHubMix) |
| `supports_max_completion_tokens` | Use `max_completion_tokens` instead of `max_tokens`; required for providers that reject both being set simultaneously (e.g. VolcEngine) | `True` |
</details>