mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-08 00:18:12 +08:00
## Summary The generic `buildRequestBody` in `internal/entity/models/base_model.go` unconditionally forwarded `ChatConfig.MaxTokens` as `"max_tokens"` for every OpenAI-compatible provider. Providers that need a different token field already delete or override it after the call (e.g. Xiaomi uses `max_completion_tokens`, Replicate uses `max_new_tokens`). This change stops setting `max_tokens` in the shared builder so it only forwards the parameters common across providers, and each provider remains free to set its own token limit field. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 KiB
26 KiB