BYOK `provider.maxOutputTokens` 从来没有到达上游请求体 (聊天完成和响应)
作者: njdldkl666699创建于 2026年9月22日更新于 2026年9月29日
When using a BYOK (OpenAI-compatible) provider, the `max_output_tokens` option documented on `ProviderConfig` is accepted and forwarded to the runtime over JSON-RPC, but the runtime never includes it in the request body sent to the upstream provider — under any configuration path I could find. The same applies to `modelCapabilities.limits.maxOutputTokens` and to `ProviderModelConfig.maxOutputTokens`. The docs for `ProviderConfig.maxOutputTokens` say: Overrides the resolved model's default max output tokens. When hit, the model stops generating and returns a truncated response. As observed, no truncation limit is ever communicated to the provider, so the provider's own default applies instead.
内容来源: github/copilot-sdk