Skip to content

feat: Add Ultra (32k token) thinking budget option#10

Merged
YishenTu merged 1 commit into
mainfrom
YishenTu/ultrathink-32k
Jan 1, 2026
Merged

feat: Add Ultra (32k token) thinking budget option#10
YishenTu merged 1 commit into
mainfrom
YishenTu/ultrathink-32k

Conversation

@YishenTu
Copy link
Copy Markdown
Owner

@YishenTu YishenTu commented Jan 1, 2026

Adds a new xhigh/Ultra thinking budget tier with 32k tokens for extended thinking workflows.

This expands the thinking budget options from off/low/medium/high to off/low/medium/high/xhigh, providing users with maximum extended thinking capacity when needed.

The new option is automatically available in the UI via THINKING_BUDGETS without requiring additional component changes.

@claude
Copy link
Copy Markdown

claude Bot commented Jan 1, 2026

PR Review: Add Ultra (32k token) thinking budget option

Summary

This PR adds a new xhigh thinking budget tier with 32k tokens, expanding the available options from off/low/medium/high to off/low/medium/high/xhigh. The changes are minimal, focused, and well-implemented.


✅ Code Quality & Best Practices

Strengths:

  • Minimal, focused changes: Only touches the necessary files (type definition and documentation)
  • Consistent naming: Uses xhigh for the value and Ultra for the UI label, following the existing pattern
  • No breaking changes: Purely additive - existing configurations remain valid
  • Self-documenting: The THINKING_BUDGETS constant automatically populates UI components without requiring additional changes
  • Documentation updated: CLAUDE.md correctly reflects the new option

Adherence to project patterns:

  • Follows the established pattern in THINKING_BUDGETS array
  • Type-safe with TypeScript union type extension
  • Aligns with the project's modular architecture

🐛 Potential Issues

None identified - The implementation is straightforward and correct.


⚡ Performance Considerations

Minimal impact:

  • No runtime performance impact - just adds a new option to a static array
  • The 32k token budget itself will have cost/latency implications for users who select it, but this is expected behavior

Consideration:

  • Users selecting xhigh should be aware of increased API costs and potential latency. Consider adding a warning or tooltip in the UI (future enhancement, not blocking for this PR).

🔒 Security Concerns

None - This change doesn't introduce any security risks. It's a configuration option that affects token budget allocation, which is handled by the Claude Agent SDK.


🧪 Test Coverage

Current state:

  • The existing test suite in tests/unit/core/types/types.test.ts validates the ThinkingBudget type
  • Tests at lines 93, 122, 150 use various budget values (off, medium, high)
  • No tests specifically validate the xhigh option yet

Recommendation:
Consider adding test cases to validate the new xhigh option and verify the THINKING_BUDGETS array includes it correctly with 32000 tokens.

Note: These test additions are suggestions for improved coverage but not blockers for merging.


📋 Additional Observations

Integration points verified:

  • InputToolbar.ts iterates over THINKING_BUDGETS - new option will appear automatically
  • ClaudianService.ts finds budget config via .find() - will handle new option correctly
  • InstructionRefineService.ts and InlineEditService.ts use the same pattern - compatible
  • ✅ Type system enforces valid values - TypeScript will catch any misuse

Documentation alignment:

  • ✅ CLAUDE.md updated correctly in the Settings section (line 181)
  • ✅ Token counts clearly documented: 0 | 4k | 8k | 16k | 32k tokens

🎯 Verdict

✅ APPROVED - This is a clean, well-implemented feature addition that follows project conventions and requires no changes before merging.

Optional follow-ups (can be addressed in future PRs):

  1. Add test coverage for the xhigh option
  2. Consider adding UI tooltips explaining cost/latency implications of higher budgets
  3. Update the "Models & Thinking" table in CLAUDE.md to mention the new Ultra option (currently only documents off/low/medium)

Great work! 🚀

@YishenTu YishenTu merged commit 6fd79c3 into main Jan 1, 2026
1 check passed
@YishenTu YishenTu deleted the YishenTu/ultrathink-32k branch January 1, 2026 10:23
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