magnificent-hairdresser-38202
10/13/2025, 4:14 AMnutritious-balloon-65098
10/13/2025, 4:14 AMnutritious-balloon-65098
10/13/2025, 4:19 AMmodel_features.py to identify reasoning models (o1, o3, DeepSeek R1, Gemini 2.5, etc.) that support reasoning_effort parameters.
2. Thought Extraction: For all models, thoughts are extracted from the assistant's message content before tool calls in `function_calling.py`:
# Extract thought from assistant message content
thought = assistant_msg.content
# Combine with first action only
action = combine_thought(action, thought)
3. Frontend Display: The frontend displays thoughts consistently based on action type:
◦ Regular actions (run, edit, browse): Show thought as separate chat message
◦ Think actions: Show as collapsible elements only
4. Event Stream Format: Identical event stream structure for both model types - all actions can have a thought field that's processed and stored uniformly.
The Real Difference:
• Reasoning models may produce richer, more detailed thoughts due to internal reasoning capabilities and reasoning_effort parameters
• Non-reasoning models produce thoughts as part of regular response generation
• Both use the same processing pipeline - the difference is in the quality/source of thought content, not the handling mechanism
This design ensures consistent user experience and compatibility regardless of the underlying model's reasoning capabilities.
<sub>View full conversation</sub>