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_tokensdefault (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:integrationfor 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
%%{ init : { "theme" : "default" }}%% graph TD subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end PythonTypes["vlmrun/client/types.py<br/>GenerationConfig.max_tokens"]:::major-edit NodeFinetuning["src/client/fine_tuning.ts<br/>max_tokens & max_new_tokens"]:::major-edit PythonClient["Python SDK Client"]:::context NodeClient["Node.js SDK Client"]:::context VlmAPI["VLM API Backend"]:::context PythonClient --> PythonTypes NodeClient --> NodeFinetuning PythonTypes --> VlmAPI NodeFinetuning --> VlmAPI classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes