Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jun 25, 2025

Description

Fixes #5111

This PR completes the fix for issue #5111 by disabling the reasoning budget UI controls for the Claude Code provider, which were misleading users since the Claude Code CLI doesn't support thinking/reasoning parameters.

Changes Made

  • Set supportsReasoningBudget: false for all Claude Code models in packages/types/src/providers/claude-code.ts
  • This prevents the reasoning toggle and budget sliders from appearing in the UI for Claude Code provider
  • Complements the previous fix that resolved intermittent reasoning content display issues

Testing

  • All existing tests pass
  • Types package tests pass (ran separately)
  • Full test suite passes
  • Linting and type checking pass
  • Manual testing shows:
    • Reasoning content is now consistently displayed when using Claude Code
    • UI no longer shows misleading reasoning controls for Claude Code provider

Verification of Acceptance Criteria

  • Issue: Reasoning content not displayed intermittently - Fixed in previous commit by improving stream parsing to handle all message types
  • Issue: UI shows reasoning controls that don't work - Fixed in this PR by disabling reasoning budget support for Claude Code models

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic (stream parsing logic)
  • Documentation updated (not needed - UI behavior change)
  • No breaking changes
  • Accessibility checked (UI controls are simply hidden, no new UI added)

Context

The Claude Code CLI uses a fixed --output-format stream-json flag and doesn't support any parameters to control thinking/reasoning output. The UI was showing controls that had no effect, which was confusing for users. This change aligns the UI with the actual capabilities of the Claude Code provider.


Important

Disables reasoning budget UI controls for Claude Code provider by setting supportsReasoningBudget: false in claude-code.ts.

  • Behavior:
    • Disables reasoning budget UI controls for Claude Code provider by setting supportsReasoningBudget: false in claude-code.ts.
    • Affects models: claude-sonnet-4-20250514, claude-opus-4-20250514, claude-3-7-sonnet-20250219, claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022.
  • Testing:
    • All tests pass, including manual verification of UI changes.
    • Confirms reasoning content is consistently displayed and controls are hidden for Claude Code.

This description was created by Ellipsis for 0068c43. You can customize this summary. It will automatically update as commits are pushed.

@Copilot Copilot AI review requested due to automatic review settings June 25, 2025 16:11
@hannesrudolph hannesrudolph requested review from cte, jr and mrubens as code owners June 25, 2025 16:11
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working UI/UX UI/UX related or focused labels Jun 25, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR disables reasoning budget UI controls for the Claude Code provider, preventing confusion from non-functional UI controls.

  • Improved partial data handling and logging in streaming responses (run.ts)
  • Disabled reasoning budget support in the Claude Code model definitions (claude-code.ts)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/integrations/claude-code/run.ts Enhanced parsing of partial data with additional logging for debugging truncated messages.
packages/types/src/providers/claude-code.ts Set supportsReasoningBudget and requiredReasoningBudget to false to align UI controls with provider capabilities.

src/integrations/claude-code/run.ts Outdated Show resolved Hide resolved
packages/types/src/providers/claude-code.ts Show resolved Hide resolved
Copy link

delve-auditor bot commented Jun 25, 2025

No security or compliance issues detected. Reviewed everything up to 0068c43.

Security Overview
  • 🔎 Scanned files: 1 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► claude-code.ts
    Add reasoning effort support flags to Claude Code models

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 25, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 25, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 25, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jun 25, 2025
Copy link
Collaborator

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 25, 2025
hannesrudolph and others added 4 commits June 25, 2025 15:20
…Code provider (#5111)

- Modified fallback logic in stream parsing to handle all message types, not just assistant messages
- Added proper parsing attempts for partial data before yielding
- Improved error logging to help debug streaming issues
- Added debug logging (controlled by DEBUG_CLAUDE_CODE env var) to trace message types

This ensures reasoning/thinking content from Claude 3.5 Sonnet 4.0 is properly displayed in all cases.
…5111)

- Set supportsReasoningBudget to false for all Claude Code models
- Claude Code CLI doesn't support thinking/reasoning parameters
- UI controls were misleading users since they had no effect
- Add missing requiredReasoningBudget: false to claude-3-5-sonnet-20241022 and claude-3-5-haiku-20241022
- Revert run.ts changes as they are not needed for fixing the UI issue
- The UI issue is resolved by properly disabling reasoning budget support in model configuration
@daniel-lxs daniel-lxs force-pushed the fix/issue-5111-claude-code-reasoning-toggle branch from 362b9f0 to 0068c43 Compare June 25, 2025 20:24
Copy link
Collaborator

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jun 25, 2025
@mrubens mrubens merged commit 896e986 into main Jun 26, 2025
14 checks passed
@mrubens mrubens deleted the fix/issue-5111-claude-code-reasoning-toggle branch June 26, 2025 00:07
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 26, 2025
Alorse pushed a commit to Alorse/Roo-Code that referenced this pull request Jun 27, 2025
…ooCodeInc#5111) (RooCodeInc#5113)

* fix: resolve intermittent reasoning content not displayed for Claude Code provider (RooCodeInc#5111)

- Modified fallback logic in stream parsing to handle all message types, not just assistant messages
- Added proper parsing attempts for partial data before yielding
- Improved error logging to help debug streaming issues
- Added debug logging (controlled by DEBUG_CLAUDE_CODE env var) to trace message types

This ensures reasoning/thinking content from Claude 3.5 Sonnet 4.0 is properly displayed in all cases.

* fix: disable reasoning budget UI controls for Claude Code provider (RooCodeInc#5111)

- Set supportsReasoningBudget to false for all Claude Code models
- Claude Code CLI doesn't support thinking/reasoning parameters
- UI controls were misleading users since they had no effect

* fix: update Claude Code models configuration

- Add missing requiredReasoningBudget: false to claude-3-5-sonnet-20241022 and claude-3-5-haiku-20241022
- Revert run.ts changes as they are not needed for fixing the UI issue
- The UI issue is resolved by properly disabling reasoning budget support in model configuration

* feat: add reasoning effort support to Claude Code models and integrate into model selection

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
hannesrudolph added a commit that referenced this pull request Jul 3, 2025
…5111) (#5113)

* fix: resolve intermittent reasoning content not displayed for Claude Code provider (#5111)

- Modified fallback logic in stream parsing to handle all message types, not just assistant messages
- Added proper parsing attempts for partial data before yielding
- Improved error logging to help debug streaming issues
- Added debug logging (controlled by DEBUG_CLAUDE_CODE env var) to trace message types

This ensures reasoning/thinking content from Claude 3.5 Sonnet 4.0 is properly displayed in all cases.

* fix: disable reasoning budget UI controls for Claude Code provider (#5111)

- Set supportsReasoningBudget to false for all Claude Code models
- Claude Code CLI doesn't support thinking/reasoning parameters
- UI controls were misleading users since they had no effect

* fix: update Claude Code models configuration

- Add missing requiredReasoningBudget: false to claude-3-5-sonnet-20241022 and claude-3-5-haiku-20241022
- Revert run.ts changes as they are not needed for fixing the UI issue
- The UI issue is resolved by properly disabling reasoning budget support in model configuration

* feat: add reasoning effort support to Claude Code models and integrate into model selection

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:S This PR changes 10-29 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Claude Code provider not displaying reasoning/thinking content for Claude 3.5 Sonnet 4.0

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.