tiktoken breaking changes
tiktoken 0.11.0 (August 8, 2025) is its newest release with breaking changes. The first: Signature changed tiktoken.load.data_gym_to_mergeable_bpe_ranks. Every breaking API change we have recorded in tiktoken on PyPI: 20 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 0.14.0, released August 17, 2026. Source repository
Its 0.8.0 release drops Python 3.8. Python end of life dates.
tiktoken 0.11.0 breaking changes
- Signature changed
tiktoken.load.data_gym_to_mergeable_bpe_ranks
Was def data_gym_to_mergeable_bpe_ranks(vocab_bpe_file: str, encoder_json_file: str, vocab_bpe_hash: str | None = None, encoder_json_hash: str | None = None) -> dict[bytes, int]; now def data_gym_to_mergeable_bpe_ranks(vocab_bpe_file: str... pypi.org
tiktoken 0.8.0 breaking changes
- Removed
Python 3.8 is no longer supported. Upgrade to a newer Python version before installing this release. github.com - Behavior changed
Decoding an invalid token now reports a new error type, so code that catches the old exception may need updating. github.com - Signature changed
tiktoken.core.Encoding.decode
Was def decode(self, tokens: list[int], errors: str = 'replace') -> str; now def decode(self, tokens: Sequence[int], errors: str = 'replace') -> str. pypi.org - Signature changed
tiktoken.core.Encoding.decode_batch
Was def decode_batch(self, batch: list[list[int]], *, errors: str = 'replace', num_threads: int = 8) -> list[str]; now def decode_batch(self, batch: Sequence[Sequence[int]], *, errors: str = 'replace', num_threads: int = 8) -> list[str]. pypi.org - Signature changed
tiktoken.core.Encoding.decode_bytes
Was def decode_bytes(self, tokens: list[int]) -> bytes; now def decode_bytes(self, tokens: Sequence[int]) -> bytes. pypi.org - Signature changed
tiktoken.core.Encoding.decode_bytes_batch
Was def decode_bytes_batch(self, batch: list[list[int]], *, num_threads: int = 8) -> list[bytes]; now def decode_bytes_batch(self, batch: Sequence[Sequence[int]], *, num_threads: int = 8) -> list[bytes]. pypi.org - Signature changed
tiktoken.core.Encoding.decode_tokens_bytes
Was def decode_tokens_bytes(self, tokens: list[int]) -> list[bytes]; now def decode_tokens_bytes(self, tokens: Sequence[int]) -> list[bytes]. pypi.org - Signature changed
tiktoken.core.Encoding.decode_with_offsets
Was def decode_with_offsets(self, tokens: list[int]) -> tuple[str, list[int]]; now def decode_with_offsets(self, tokens: Sequence[int]) -> tuple[str, list[int]]. pypi.org - Signature changed
tiktoken.Encoding.decode
Was def decode(self, tokens: list[int], errors: str = 'replace') -> str; now def decode(self, tokens: Sequence[int], errors: str = 'replace') -> str. pypi.org - Signature changed
tiktoken.Encoding.decode_batch
Was def decode_batch(self, batch: list[list[int]], *, errors: str = 'replace', num_threads: int = 8) -> list[str]; now def decode_batch(self, batch: Sequence[Sequence[int]], *, errors: str = 'replace', num_threads: int = 8) -> list[str]. pypi.org
And 4 more in this version. Sign up to see every change
tiktoken 0.6.0 breaking changes
- Signature changed
tiktoken.load.data_gym_to_mergeable_bpe_ranks
Was def data_gym_to_mergeable_bpe_ranks(vocab_bpe_file: str, encoder_json_file: str) -> dict[bytes, int]; now def data_gym_to_mergeable_bpe_ranks(vocab_bpe_file: str, encoder_json_file: str, vocab_bpe_hash: Optional[str] = None... pypi.org - Signature changed
tiktoken.load.load_tiktoken_bpe
Was def load_tiktoken_bpe(tiktoken_bpe_file: str) -> dict[bytes, int]; now def load_tiktoken_bpe(tiktoken_bpe_file: str, expected_hash: Optional[str] = None) -> dict[bytes, int]. pypi.org - Signature changed
tiktoken.load.read_file_cached
Was def read_file_cached(blobpath: str) -> bytes; now def read_file_cached(blobpath: str, expected_hash: Optional[str] = None) -> bytes. pypi.org
tiktoken 0.5.0 breaking changes
- Removed
tiktoken.model.MODEL_PREFIX_TO_ENCODING
tiktoken.model.MODEL_PREFIX_TO_ENCODING was removed in tiktoken 0.5.0 pypi.org - Removed
tiktoken.model.MODEL_TO_ENCODING
tiktoken.model.MODEL_TO_ENCODING was removed in tiktoken 0.5.0 pypi.org
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.