Write path serializes thinking as reasoning_content which some providers don't support
bug
In #981, reasoning effort was enabled for Ollama, which also updated the read path to check both `reasoning` and `reasoning_content` fields.
However, when `preserve_thinking = TRUE`, the multi-turn write path in `ProviderOpenAICompatible` serializes `ContentThinking` back as `reasoning_content`. Providers like vLLM only recognize `reasoning` (removed `reasoning_content` entirely in vllm-project/vllm#33402).
The ecosystem is split on field naming:
- OpenAI and OpenRouter recommend `reasoning` as primary (with `reasoning_content` as alias)
- LM Studio uses only `reasoning_content`
- vLLM uses only `reasoning`
One option is a field on `ProviderOpenAICompatible` to configure which field name to use. See discussion in #981 for more context.
Not currently biting anyone since `preserve_thinking` defaults to `FALSE` for Ollama, but worth addressing.
0 条评论