Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Mar 8, 2025

Context

@ReadyPlayerEmma noticed that even though the thinking models visually default to 16k max tokens in the case where the user hasn't touched the max tokens slider, they were being treated as 128k max tokens in the sliding window calculations.

Implementation

This is the quickest fix of just hardcoding to 16k if undefined like we do elsewhere. Really need to clean this code up though.


Important

Fixes default modelMaxTokens for thinking models to 16,384 in Cline.ts and updates tests to verify this behavior.

  • Behavior:
    • Fixes default modelMaxTokens for thinking models in Cline.ts to 16,384 if undefined.
  • Constants:
    • Introduces DEFAULT_THINKING_MODEL_MAX_TOKENS in model-utils.ts set to 16,384.
  • Tests:
    • Updates getMaxTokensForModel.test.tsx to test fallback to DEFAULT_THINKING_MODEL_MAX_TOKENS.
    • Adds tests in model-utils.test.ts to verify behavior for thinking models with undefined modelMaxTokens.

This description was created by Ellipsis for da286c4. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2025

⚠️ No Changeset found

Latest commit: da286c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 8, 2025
@dosubot dosubot bot added the bug Something isn't working label Mar 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 8, 2025
@mrubens mrubens force-pushed the sliding_window_logging branch from fdbc0e0 to 0715636 Compare March 8, 2025 03:46
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Mar 8, 2025
@mrubens mrubens force-pushed the sliding_window_logging branch from 0715636 to da286c4 Compare March 8, 2025 04:00
@mrubens mrubens merged commit e5d764c into main Mar 8, 2025
9 checks passed
@mrubens mrubens deleted the sliding_window_logging branch March 8, 2025 04:03
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 8, 2025
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 size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants