fix(ai_model): support reasoning field for Ollama/LMStudio thinking models#787
Merged
ulleo merged 1 commit intodataease:mainfrom Jan 22, 2026
Merged
Conversation
…odels Add compatibility for the `reasoning` field in addition to `reasoning_content`. Ollama/LMStudio follows GPT-OSS official recommendation to use `reasoning` field for thinking content, while DeepSeek uses `reasoning_content`. Priority: reasoning_content > reasoning (fallback)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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。测试方法