@@ -38,6 +38,7 @@ def _create_openai_llm(
3838 max_tokens : int ,
3939 agenthub_config : str ,
4040 byo_connection_id : str | None = None ,
41+ ** kwargs : Any ,
4142) -> BaseChatModel :
4243 """Create UiPathChatOpenAI for OpenAI models via LLMGateway."""
4344 from uipath_langchain .chat .openai import UiPathChatOpenAI
@@ -55,6 +56,7 @@ def _create_openai_llm(
5556 agenthub_config = agenthub_config ,
5657 byo_connection_id = byo_connection_id ,
5758 output_version = "v1" ,
59+ ** kwargs ,
5860 )
5961 case APIFlavor .OPENAI_COMPLETIONS :
6062 return UiPathChatOpenAI (
@@ -66,6 +68,7 @@ def _create_openai_llm(
6668 agenthub_config = agenthub_config ,
6769 byo_connection_id = byo_connection_id ,
6870 output_version = "v1" ,
71+ ** kwargs ,
6972 )
7073 case _:
7174 raise ValueError (f"Unknown api_flavor={ api_flavor } for OpenAI" )
@@ -78,6 +81,7 @@ def _create_bedrock_llm(
7881 max_tokens : int ,
7982 agenthub_config : str ,
8083 byo_connection_id : str | None = None ,
84+ ** kwargs : Any ,
8185) -> BaseChatModel :
8286 """Create UiPathChatBedrockConverse for Claude models via LLMGateway."""
8387 from uipath_langchain .chat .bedrock import (
@@ -94,6 +98,7 @@ def _create_bedrock_llm(
9498 agenthub_config = agenthub_config ,
9599 byo_connection_id = byo_connection_id ,
96100 output_version = "v1" ,
101+ ** kwargs ,
97102 )
98103 case APIFlavor .AWS_BEDROCK_INVOKE :
99104 return UiPathChatBedrock (
@@ -103,6 +108,7 @@ def _create_bedrock_llm(
103108 agenthub_config = agenthub_config ,
104109 byo_connection_id = byo_connection_id ,
105110 output_version = "v1" ,
111+ ** kwargs ,
106112 )
107113 case _:
108114 raise ValueError (f"Unknown api_flavor={ api_flavor } for AwsBedrock" )
@@ -115,6 +121,7 @@ def _create_vertex_llm(
115121 max_tokens : int | None ,
116122 agenthub_config : str ,
117123 byo_connection_id : str | None = None ,
124+ ** kwargs : Any ,
118125) -> BaseChatModel :
119126 """Create UiPathChatVertex for Gemini models via LLMGateway."""
120127 from uipath_langchain .chat .vertex import UiPathChatVertex
@@ -128,6 +135,7 @@ def _create_vertex_llm(
128135 agenthub_config = agenthub_config ,
129136 byo_connection_id = byo_connection_id ,
130137 output_version = "v1" ,
138+ ** kwargs ,
131139 )
132140 case APIFlavor .VERTEX_ANTHROPIC_CLAUDE :
133141 raise ValueError (f"api_flavor={ api_flavor } is not yet supported for Vertex" )
@@ -223,6 +231,7 @@ def get_chat_model(
223231 max_tokens : int ,
224232 agenthub_config : str ,
225233 byo_connection_id : str | None = None ,
234+ ** kwargs : Any ,
226235) -> BaseChatModel :
227236 """Create and configure LLM instance using LLMGateway API.
228237
@@ -243,6 +252,7 @@ def get_chat_model(
243252 max_tokens ,
244253 agenthub_config ,
245254 byo_connection_id ,
255+ ** kwargs ,
246256 )
247257 case LLMProvider .BEDROCK :
248258 return _create_bedrock_llm (
@@ -252,6 +262,7 @@ def get_chat_model(
252262 max_tokens ,
253263 agenthub_config ,
254264 byo_connection_id ,
265+ ** kwargs ,
255266 )
256267 case LLMProvider .VERTEX :
257268 return _create_vertex_llm (
@@ -261,4 +272,5 @@ def get_chat_model(
261272 max_tokens ,
262273 agenthub_config ,
263274 byo_connection_id ,
275+ ** kwargs ,
264276 )
0 commit comments