Skip to content

Add maxTokens - #375

Merged
josorio-autoblocks merged 3 commits into
mainfrom
add_max_tokens
Jul 29, 2025
Merged

Add maxTokens#375
josorio-autoblocks merged 3 commits into
mainfrom
add_max_tokens

Conversation

@josorio-autoblocks

@josorio-autoblocks josorio-autoblocks commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a new max_tokens parameter to the prompt parameter classes in the test suite, specifically for versions 3 and 4 of the _PromptBasicParams classes. The change introduces a general token limit field alongside the existing max_completion_tokens field.

The max_tokens field is defined as a required Union[float, int] with a camelCase alias "maxTokens", following the same pattern as other parameters in these classes. This addition appears to be testing the prompt system's ability to handle different token limit configurations that may be required by various LLM APIs.

The change is isolated to the test infrastructure (tests/e2e/prompts_v2/apps/ci_app/prompts.py) and only affects the newer parameter schema versions (3 and 4), while leaving the older versions (1 and 2) unchanged. This suggests a deliberate design decision to support backward compatibility while extending functionality for newer prompt configurations.

The implementation follows established conventions in the codebase - using Pydantic field definitions with proper type hints, required field markers (...), and camelCase aliases that likely match the expected API format. This change enables testing scenarios where both general token limits and completion-specific token limits need to be supported simultaneously.

Confidence score: 5/5

• This PR is very safe to merge as it only adds test parameters without affecting production code
• The implementation follows existing patterns perfectly and is limited to test infrastructure
• No files need additional attention - the change is straightforward and well-contained

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@josorio-autoblocks
josorio-autoblocks merged commit 75e14b4 into main Jul 29, 2025
15 of 18 checks passed
@josorio-autoblocks
josorio-autoblocks deleted the add_max_tokens branch July 29, 2025 21:56
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