Add GPT-5.5 and GPT-5.6 Tiktoken support#7661
Merged
Merged
Conversation
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
stephentoub
July 16, 2026 13:01
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GPT-5.5 and GPT-5.6 model-name resolution to the ML.NET TiktokenTokenizer so CreateForModel(...) maps these models (and their -<variant> suffix forms) to the o200k_base encoding, with test coverage updates.
Changes:
- Extend
TiktokenTokenizermodel-to-encoding mappings to includegpt-5.5/gpt-5.6andgpt-5.5-*/gpt-5.6-*prefixes. - Add test cases validating creation and supported-name handling for
gpt-5.5/gpt-5.6and representative suffix variants.
Show a summary per file
| File | Description |
|---|---|
src/Microsoft.ML.Tokenizers/Model/TiktokenTokenizer.cs |
Adds exact and prefix model mappings for GPT-5.5/GPT-5.6 to O200kBase. |
test/Microsoft.ML.Tokenizers.Tests/TiktokenTests.cs |
Extends supported-model test matrices to include GPT-5.5/GPT-5.6 (and variant examples). |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
tarekgh
approved these changes
Jul 16, 2026
Member
|
/ba-g opened the issue #7662 to track unrelated failures. |
Member
|
Thanks @stephentoub! |
This was referenced Jul 16, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds Tiktoken model resolution for GPT-5.5 and GPT-5.6 using the
o200k_baseencoding.Changes
gpt-5.5,gpt-5.6gpt-5.5-miniandgpt-5.6-nano