Skip to content

Add GPT-5.1 with the o200k_base encoding in tiktoken/model.py #464

@eshaanpathak

Description

@eshaanpathak

Similar to this PR, we need to add GPT-5.1 to tiktoken/model.py. I don't seem to have access to create a PR to do this, so I am creating an Issue here.

More specifically, we need to add "gpt-5.1-" : "o200k_base" to MODEL_PREFIX_TO_ENCODING and "gpt-5.1" : "o200k_base" to MODEL_TO_ENCODING. This otherwise leads to a KeyError in encoding_name_for_model().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions