fix(ai_model): support reasoning field for Ollama/LMStudio thinking models #787
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
reasoning字段的兼容支持(Ollama/LMStudio 遵循 GPT-OSS 官方建议)reasoning_content字段的向后兼容(DeepSeek 等)reasoning_content>reasoning(回退)问题描述
当连接 Ollama/LMStudio 托管的思考模型(如 GPT-OSS 120B)时,界面上的思考过程始终为空。
根因:Ollama/LMStudio 在返回 JSON 中使用
reasoning字段,而代码只提取reasoning_content。测试方法