mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
fix(providers): read a non-version hyphen suffix like -32k as part of the model name
This commit is contained in:
parent
32c93dd945
commit
86bf1983d2
2 changed files with 4 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ MAX_CACHE_CONTROL_BLOCKS: Final = 4
|
|||
|
||||
CACHE_BREAKPOINT_KEYS: Final = ("cache_control", "prompt_cache_breakpoint")
|
||||
OPENAI_PROMPT_CACHE_BREAKPOINT_MIN_GPT_VERSION: Final = (5, 6)
|
||||
_GPT_VERSION_PATTERN: Final = re.compile(r"^gpt-(\d+)(?:[.-](\d{1,2})(?!\d))?")
|
||||
_GPT_VERSION_PATTERN: Final = re.compile(r"^gpt-(\d+)(?:[.-](0|[1-9]\d?)(?![\da-z]))?")
|
||||
_FINE_TUNED_BASE_PATTERN: Final = re.compile(r"^ft:([^:]+)")
|
||||
_O_SERIES_PATTERN: Final = re.compile(r"^o\d+(?:-|$)")
|
||||
OPENAI_PROMPT_CACHE_BREAKPOINT_BLOCK_TYPES: Final = frozenset(
|
||||
|
|
|
|||
|
|
@ -3486,6 +3486,9 @@ class TestOpenAIPromptCacheBreakpoint:
|
|||
("gpt-5-6-sol", True),
|
||||
("gpt-6-1", True),
|
||||
("gpt-5-4-mini", False),
|
||||
("gpt-5-32k", False),
|
||||
("gpt-5-6b", False),
|
||||
("gpt-5-06", False),
|
||||
("gpt-5-2026-03-01", False),
|
||||
("gpt-4-1106-preview", False),
|
||||
("o3", False),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue