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().
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"toMODEL_PREFIX_TO_ENCODINGand"gpt-5.1" : "o200k_base"toMODEL_TO_ENCODING. This otherwise leads to aKeyErrorinencoding_name_for_model().