Merge pull request #22895 from BerriAI/litellm_o-series-generalize-detection
fix(o-series): generalize is_model_o_series_model to match any o+digit prefix
This commit is contained in:
commit
bc481f49d3
@ -131,7 +131,10 @@ class OpenAIOSeriesConfig(OpenAIGPTConfig):
|
||||
|
||||
def is_model_o_series_model(self, model: str) -> bool:
|
||||
model = model.split("/")[-1] # could be "openai/o3" or "o3"
|
||||
return model.startswith(("o1", "o3", "o4")) and model in litellm.open_ai_chat_completion_models
|
||||
return (
|
||||
len(model) > 1 and model[0] == "o" and model[1].isdigit()
|
||||
and model in litellm.open_ai_chat_completion_models
|
||||
)
|
||||
|
||||
@overload
|
||||
def _transform_messages(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user