Skip to content

feat: make reasoning summary configurable via settings - #18

Merged
serialx merged 2 commits into
mainfrom
claude/dispatch-16958719381-20250814-0726
Aug 14, 2025
Merged

serialx merged 2 commits into
mainfrom
claude/dispatch-16958719381-20250814-0726

Conversation

@serialx

@serialx serialx commented Aug 14, 2025

Copy link
Copy Markdown
Owner

Add reasoning_summary setting to control how reasoning summaries are displayed.
Users can now configure this as 'auto' (default), 'concise', 'detailed', or null to disable.

  • Add reasoning_summary field to Settings with proper type annotations
  • Update default_agent, task_agent, and main.py to use the new setting
  • Replace hardcoded "auto" values with configurable setting
  • Maintain backward compatibility with "auto" as default

claude Bot and others added 2 commits August 14, 2025 07:29
Add reasoning_summary setting to control how reasoning summaries are displayed.
Users can now configure this as 'auto' (default), 'concise', 'detailed', or null to disable.

- Add reasoning_summary field to Settings with proper type annotations
- Update default_agent, task_agent, and main.py to use the new setting
- Replace hardcoded "auto" values with configurable setting
- Maintain backward compatibility with "auto" as default

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Sung-jin Brian Hong <serialx@users.noreply.github.com>
…riable

Add field validator to convert string 'off' to Python None for proper
reasoning_summary handling when set via environment variables.

This fixes the ValidationError that occurred when users set:
VIBECORE_REASONING_SUMMARY=off

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Sung-jin Brian Hong <serialx@users.noreply.github.com>
@claude

claude Bot commented Aug 14, 2025 •

Copy link
Copy Markdown
Contributor

Claude finished @serialx's task —— View job


Pull Request Review

Review Checklist

  • Gather context and read changed files
  • Review code quality and best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Assess security concerns
  • Review test coverage
  • Provide comprehensive feedback

Overall Assessment

This PR successfully adds configurable reasoning summary settings to control how AI reasoning is displayed. The implementation is clean and maintains backward compatibility. However, there are some areas that could be improved.

🟢 Code Quality and Best Practices

Strengths:

  • Clean implementation following existing patterns in the codebase
  • Proper use of Pydantic's field_validator for input normalization
  • Maintains backward compatibility with "auto" as default
  • Clear and descriptive field documentation
  • Appropriate use of type hints with Literal and None

Suggestions:

  • The validator comment mentions converting string 'null' to None, but it actually handles 'off' and empty string. Update the docstring: src/vibecore/settings.py:120

🟡 Potential Bugs or Issues

  1. Inconsistent reasoning configuration in src/vibecore/agents/default.py:59-61:

    reasoning_config = Reasoning(summary=settings.reasoning_summary)
    if settings.reasoning_effort is not None:
        reasoning_config = Reasoning(effort=settings.reasoning_effort, summary=settings.reasoning_summary)

    When reasoning_effort is set, the entire Reasoning object is recreated, which could lead to confusion. Consider:

    reasoning_config = Reasoning(summary=settings.reasoning_summary)
    if settings.reasoning_effort is not None:
        reasoning_config.effort = settings.reasoning_effort

    However, if Reasoning is immutable, the current approach is correct.

  2. Missing reasoning effort in task_agent.py (src/vibecore/agents/task_agent.py:63):
    The task agent only sets reasoning_summary but ignores reasoning_effort. For consistency, it should respect both settings like the default agent does.

  3. Description mismatch in src/vibecore/settings.py:114:
    The field description says 'auto', 'concise', 'detailed', or 'off' but the type annotation only allows the first three as Literal values. The validator converts 'off' to None, which is correct, but the description could be clearer about this.

🟢 Performance Considerations

  • No performance concerns. The changes are limited to configuration and initialization code.
  • The field validator runs only during settings initialization, not during runtime.

🟢 Security Concerns

  • No security issues identified. The changes only affect display settings for AI reasoning output.
  • Input validation is properly handled through Pydantic's type system and the custom validator.

🔴 Test Coverage

Missing Tests:

  • No tests were added for the new reasoning_summary setting
  • No tests for the validate_reasoning_summary field validator
  • No integration tests to verify the setting is properly passed to agents

Recommended test additions:

  1. Unit test for the field validator in a new tests/test_settings.py:

    • Test 'off' converts to None
    • Test empty string converts to None
    • Test valid values ('auto', 'concise', 'detailed') pass through
    • Test invalid values raise ValidationError
  2. Integration tests to verify:

    • Environment variable VIBECORE_REASONING_SUMMARY=off works correctly
    • The setting is properly passed to both default_agent and task_agent
    • The reasoning configuration is correctly applied in model_settings

📝 Additional Recommendations

  1. Documentation: Consider adding user-facing documentation about this new setting, explaining when to use each mode and how to configure it via environment variables or config file.

  2. Consistency: Apply the same reasoning configuration logic to both default_agent and task_agent to ensure consistent behavior.

  3. Validation: Consider adding validation to ensure the reasoning_summary value is compatible with the selected model (some models might not support all modes).

Summary

The implementation is solid and achieves its goal of making reasoning summaries configurable. The main concerns are the lack of test coverage and minor inconsistencies between agents. With the addition of appropriate tests and the suggested fixes, this PR would be ready to merge.

@serialx
serialx merged commit 7990a32 into main Aug 14, 2025
3 checks passed
@serialx
serialx deleted the claude/dispatch-16958719381-20250814-0726 branch August 14, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant