Repository navigation
fix(deps): upgrade tiktoken to 0.14.0 - #39718
silencedoctor wants to merge 1 commit into
Conversation
Merging this PR will improve performance by 64.46%
Performance Changes
Tip Curious why performance improved? Comment Comparing |
|
@greptileai Please review this dependency upgrade |
Greptile SummaryThis PR upgrades the minimum tiktoken version to 0.14.0 and refreshes the lockfile so newer GPT-5 models use their upstream encoding mappings
Confidence Score: 5/5The dependency upgrade appears safe to merge, with consistent lock metadata and focused regression coverage No actionable failures remain. The supported Python range has matching wheels, production usage relies on compatible public APIs, and the new test verifies the intended model mapping behavior
|
| Filename | Overview |
|---|---|
| pyproject.toml | Raises the tiktoken runtime dependency floor to 0.14.0 without conflicting with supported Python versions |
| tests/test_litellm/litellm_core_utils/test_token_counter.py | Adds a meaningful regression test through LiteLLM's production token-counting path for GPT-5.6 |
| uv.lock | Consistently resolves tiktoken 0.14.0 and records artifacts covering the repository's supported Python range |
Reviews (1): Last reviewed commit: "fix(deps): upgrade tiktoken to 0.14.0" | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
TLDR
Problem this solves:
tiktoken 0.12.0and permits installs back to0.8.0gpt-5.6are not mapped by0.12.0, so LiteLLM falls back tocl100k_base0.13.0and0.14.0releases include BPE performance work, broader GPT-5 mappings, and current Python wheelsHow it solves it:
tiktoken>=0.14.0,<1.0uv.lockto resolvetiktoken 0.14.0o200k_baseandcl100k_basedifferRelevant issues
Fixes #39716
Related: #26193, #37697
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
The proof is command-line based because this is a dependency and token-counting change
With the frozen lockfile:
The focused regression suite passes:
The same wheel and mapping were verified with uv on Python 3.10, 3.11, 3.12, 3.13, and 3.14
Type
Bug Fix
Changes
pyproject.tomlraises the runtime floor,uv.lockrecords the 0.14.0 sdist and wheels, andtest_token_counter.pyprotects the GPT-5 mapping behaviorCaveats
make checkreached Prisma generation but stopped at the dashboard bootstrap because this machine has npm 11.6.2 while the dashboard requires npm >=11.10.0. Python-side lock, import, token-counting, and Ruff checks passThe upstream fork-dependency guard rejects
uv.lockchanges from cross-repository PRs by design. This PR includes the lock refresh because the requested upgrade is incomplete without it; if the guard blocks the workflow, a maintainer will need to apply the same lockfile change from a branch in the canonical repositoryFinal Attestation