-
Notifications
You must be signed in to change notification settings - Fork 429
fix: 修复因错误合并导致的bug #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: 修复因错误合并导致的bug #621
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Samueli924/chaoxing
Length of output: 6218
🏁 Script executed:
Repository: Samueli924/chaoxing
Length of output: 27070
🌐 Web query:
OpenAI Python ChatCompletionMessage reasoning_content attribute Content💡 Result:
In the standard official OpenAI Python SDK, the ChatCompletionMessage object does not include a native reasoning_content attribute [1]. While some third-party model providers (such as DeepSeek or Grok) and local inference servers like vLLM include a reasoning_content field in their API responses to expose "thinking" or "reasoning" tokens, OpenAI has explicitly declined to incorporate this field as a standard part of their Python SDK's ChatCompletionMessage object [2][3][4][5]. Key technical points: 1. SDK Absence: The official openai-python library's ChatCompletionMessage class definition does not define reasoning_content [1]. Attempts to introduce this field into the official SDK via pull requests have been declined [2]. 2. Third-Party Usage: You may encounter this field when using the OpenAI Python client to communicate with third-party APIs that follow the OpenAI Chat Completions API format but extend it to include reasoning tokens [4][5]. In these scenarios, developers often access the field dynamically (e.g., via getattr or casting) because the SDK's type-hinting will not recognize it [6][4]. 3. OpenAI's Reasoning Approach: OpenAI handles reasoning models via their own specific APIs and architectural patterns (e.g., the Responses API or specific reasoning contexts) rather than by exposing raw reasoning tokens in the standard ChatCompletionMessage structure [7]. If you are working with a third-party service that returns reasoning_content, you can access it by treating the response message as a dictionary or using dynamic attribute access, but you should not expect it to be a permanent or supported feature of the official OpenAI Python SDK [6][4].
Citations:
Keep the AI provider startup check aligned with the real answer parsing.
check_llm_connection()returns success when onlyreasoning_contentis present, becauseAI._query_locked()continues to parsecompletion.choices[0].message.content. A reasoning-only response can clear startup validation but fail asNonewhen real questions are answered. Require usable answer content in the check, or parsereasoning_contentin_query_locked()the same way.🤖 Prompt for AI Agents