4949 'anthropic--claude-3.7-sonnet' ,
5050 'anthropic--claude-4-sonnet' ,
5151 'anthropic--claude-4-opus' ,
52+ 'anthropic--claude-4.5-sonnet' ,
5253 ],
5354 'azure-openai' :
5455 [
7273 'gemini-2.5-flash' ,
7374 'gemini-2.5-pro' ,
7475 ],
76+ 'perplexity-ai' :
77+ [
78+ 'sonar' ,
79+ 'sonar-pro' ,
80+ ],
7581}
7682
7783
@@ -91,13 +97,19 @@ def from_model_name(cls, model_name: str) -> 'LLM':
9197 # Foundation-models scenarios in AI Core
9298 if model_name in AICORE_MODELS ['azure-openai' ]:
9399 return AICoreOpenAILLM (model_name )
100+ # IBM models are compatible with OpenAI completion API
94101 if model_name in AICORE_MODELS ['aicore-ibm' ]:
95- # IBM models are compatible with OpenAI completion API
96102 return AICoreOpenAILLM (model_name )
97103 if model_name in AICORE_MODELS ['aicore-opensource' ]:
98104 return AICoreOpenAILLM (model_name , False )
105+ # Mistral models are compatible with OpenAI completion API
99106 if model_name in AICORE_MODELS ['aicore-mistralai' ]:
100107 return AICoreOpenAILLM (model_name , False )
108+ # Perplexity models are compatible with OpenAI completion API
109+ if model_name in AICORE_MODELS ['perplexity-ai' ]:
110+ return AICoreOpenAILLM (model_name )
111+
112+ # Non OpenAI-compatible models in AI Core
101113 if model_name in AICORE_MODELS ['aws-bedrock' ]:
102114 if 'titan' in model_name :
103115 # Titan models don't support system prompts
0 commit comments