Skip to content

Add support for GPT-5 models - #75

Merged
gjtorikian merged 3 commits into
IAPark:mainfrom
britt-645:add-gpt5-support
Aug 26, 2025
Merged

Add support for GPT-5 models#75
gjtorikian merged 3 commits into
IAPark:mainfrom
britt-645:add-gpt5-support

Conversation

@britt-645

Copy link
Copy Markdown

Adds "gpt-5-" prefix mapping to o200k_base encoding to support upcoming GPT-5 models, following the upstream tiktoken Python library implementation.

This change allows the library to properly tokenize text for any GPT-5 model variants (e.g., gpt-5-turbo, gpt-5-preview, etc.) by mapping them to the o200k_base encoding, consistent with the upstream Python tiktoken library.

Adds "gpt-5-" prefix mapping to o200k_base encoding to support upcoming GPT-5 models, following the upstream tiktoken Python library implementation.
@britt-645

Copy link
Copy Markdown
Author

@IAPark @gjtorikian Could you please review this PR? It adds GPT-5 support by following the upstream tiktoken Python library implementation. Thanks!

@gjtorikian

Copy link
Copy Markdown
Collaborator

Just ack’ing this—the models in this gem have gone out of date a bit because I’ve been waiting for another dependency to be updated. It’s my priority this week to figure out how to work around that, and after I do I’ll be able to merge this and cut a new release.

Sorry for the delay!

@gjtorikian
gjtorikian merged commit b27bebe into IAPark:main Aug 26, 2025
5 checks passed
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.

3 participants