Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Update lm.py

Omar Khattab7fcc0952f9eb
diff --git a/dspy/clients/lm.py b/dspy/clients/lm.py
index fe9f6d1f8..2bbf0ce09 100644
--- a/dspy/clients/lm.py
+++ b/dspy/clients/lm.py
@@ -84,8 +84,8 @@ class LM(BaseLM):
# Handle model-specific configuration for different model families
model_family = model.split("/")[-1].lower() if "/" in model else model.lower()
- # Match pattern: o[1,3] at the start, optionally followed by -mini and anything else
- model_pattern = re.match(r"^o([13])(?:-mini)?", model_family)
+ # Match pattern: o[1,3,4] at the start, optionally followed by -mini and anything else
+ model_pattern = re.match(r"^o([134])(?:-mini)?", model_family)
if model_pattern:
# Handle OpenAI reasoning models (o1, o3)