Update max_tokens default from 4096 to 65535 #108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update token defaults from 4096/1024 to 65535
Summary
Updated default token limits across both Python and Node.js SDKs to increase the maximum tokens from 4096/1024 to 65535. This change affects:
GenerationConfig.max_tokens
default (4096 → 65535)max_tokens
(4096 → 65535) andmax_new_tokens
(1024 → 65535)The changes allow users to process longer content by default without requiring explicit token limit configuration.
Review & Testing Checklist for Human
npm run test:integration
for Node.js, full test suite for Python) to confirm end-to-end functionality works with new defaultsRecommended Test Plan: Create a test request with content that would exceed the old limits (>4096 tokens) but stay within the new limit, and verify it processes successfully through the full API pipeline.
Diagram
Notes