From bc1ca8113543ed0ae832e5fdf5e2c8583e88eef1 Mon Sep 17 00:00:00 2001 From: ppinchuk Date: Fri, 31 Oct 2025 16:54:55 -0600 Subject: [PATCH 1/2] Add gpt-5 as fallback model and to pattern --- elm/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elm/base.py b/elm/base.py index 409489ab..ef987c3e 100644 --- a/elm/base.py +++ b/elm/base.py @@ -53,7 +53,7 @@ class ApiBase(ABC): } """Optional mappings for unusual Azure names to tiktoken/openai names.""" - TOKENIZER_PATTERNS = ('gpt-4o', 'gpt-4-32k', 'gpt-4') + TOKENIZER_PATTERNS = ('gpt-5', 'gpt-4o', 'gpt-4-32k', 'gpt-4') """Order-prioritized list of model sub-strings to look for in model name to send to tokenizer. As an alternative to alias lookup, this will use the tokenizer pattern if found in the model string""" @@ -353,7 +353,7 @@ def get_embedding(cls, text): return embedding @classmethod - def count_tokens(cls, text, model, fallback_model='gpt-4'): + def count_tokens(cls, text, model, fallback_model='gpt-5'): """Return the number of tokens in a string. Parameters @@ -362,7 +362,7 @@ def count_tokens(cls, text, model, fallback_model='gpt-4'): Text string to get number of tokens for model : str specification of OpenAI model to use (e.g., "gpt-3.5-turbo") - fallback_model : str, default='gpt-4' + fallback_model : str, default='gpt-5' Model to be used for tokenizer if input model can't be found in :obj:`TOKENIZER_ALIASES` and doesn't have any easily noticeable patterns. From 088dda42264e10979c0bbc1147b6f1766dbf5511 Mon Sep 17 00:00:00 2001 From: ppinchuk Date: Fri, 31 Oct 2025 16:55:07 -0600 Subject: [PATCH 2/2] Bump version --- elm/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elm/version.py b/elm/version.py index 017c8ff0..b42fce51 100644 --- a/elm/version.py +++ b/elm/version.py @@ -2,4 +2,4 @@ ELM version number """ -__version__ = "0.0.33" +__version__ = "0.0.34"