Feat/log reasoning effort#947
Open
Immersion-Dreaming wants to merge 9 commits into
Open
Conversation
Add an info-level log in apply_openai_compatible_reasoning_fields that prints the raw configured value, the normalized value, model name, and reasoning mode. This makes it easy to observe what reasoning_effort actually takes effect, solving the problem of users being unable to tell which value was sent to the API after normalization.
The Anthropic adapter path already normalizes reasoning_effort for DeepSeek models but had no observability. Add the same info-level log that was added to the OpenAI quirks path, covering all ReasoningMode variants.
Add a format-agnostic extractor (wire_reasoning.rs) that reads thinking and effort values from the final provider request body, regardless of which adapter built it (OpenAI Chat, OpenAI Responses, Anthropic, Gemini). The extracted fields are carried through StreamResponse and logged in round_executor at ai::model_response target alongside other model metrics. This replaces the previous per-adapter logging approach with a single extraction point in sse.rs that covers all adapters uniformly.
Move remote workspace, session, initial-sync, poll, and interaction command orchestration into services-integrations while keeping concrete runtime adapters in core. Update decomposition docs and boundary checks to match the new owner split.
Collaborator
|
reasoning_effort 的正确来源已经在现有链路里了:AIModelConfig.reasoning_effort -> AIConfig.reasoning_effort,core 里直接从 ai_client.config.reasoning_effort.as_deref() 拿即可。反解析没什么必要。 |
e5ca68d to
19b53b1
Compare
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.
Add wire_reasoning.rs — a format-agnostic extractor that reads thinking/effort from the final request body across all adapters (OpenAI Chat, Responses, Anthropic, Gemini).
Values flow through StreamResponse and are logged at ai::model_response as wire_thinking and wire_effort.
Where to see the log
ai.log
as: [DEBUG][ai::model_response] ... wire_thinking=Some("enabled"), wire_effort=Some("max")