File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/openlayer/lib/integrations Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -403,13 +403,14 @@ def _extract_model_info(
403403 or serialized .get ("name" )
404404 )
405405
406- # Override provider from LiteLLM model prefix (e.g. "gemini/gemini-2.5-flash")
407- # when the model is accessed through a proxy that reports as "openai-chat" .
406+ # Handle LiteLLM model prefix (e.g. "gemini/gemini-2.5-flash"):
407+ # extract the actual provider and strip the prefix from the model name .
408408 if model and "/" in model :
409- prefix = model .split ("/" , 1 )[ 0 ]
409+ prefix , model_name = model .split ("/" , 1 )
410410 litellm_provider = LITELLM_PREFIX_TO_PROVIDER_MAP .get (prefix )
411411 if litellm_provider :
412412 provider = litellm_provider
413+ model = model_name
413414
414415 # Clean invocation params (remove internal LangChain params)
415416 clean_params = {
You can’t perform that action at this time.
0 commit comments