Fail open for GPT-5 model tokenisers - #596
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a34ef03435
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "o4-mini-": "o200k_base", | ||
| # chat | ||
| "gpt-5-": "o200k_base", | ||
| "gpt-5": "o200k_base", |
There was a problem hiding this comment.
Preserve a delimiter after the GPT-5 family name
When callers pass a different family or a typo such as gpt-50 or gpt-5foo, this delimiter-free prefix now silently selects o200k_base instead of raising the documented KeyError. That can produce incorrect token counts for future model families; retain the hyphenated prefix and add only the specific additional GPT-5 separators that need fail-open handling, such as gpt-5..
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Preserve a delimiter after the GPT-5 family name
When callers pass a different family or a typo such as
gpt-50orgpt-5foo, this delimiter-free prefix now silently selectso200k_baseinstead of raising the documentedKeyError. That can produce incorrect token counts for future model families; retain the hyphenated prefix and add only the specific additional GPT-5 separators that need fail-open handling, such asgpt-5..Useful? React with 👍 / 👎.
No description provided.