Skip to content

Commit 0de9716

Browse files
committed
fix: vertexai default_headers consistency + demo import path
- clients/vertexai/chat_models.py: pass dict(self.uipath_sync_client.headers) and dict(self.uipath_async_client.headers) instead of the raw httpx.Headers objects, matching the pattern used in clients/anthropic/chat_models.py - demo.py: import RoutingMode from the public uipath_langchain_client.settings API instead of the internal uipath.llm_client.settings.constants path; merge with the existing get_default_client_settings import
1 parent 7ef9dfa commit 0de9716

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

packages/uipath_langchain_client/demo.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
from langchain_core.messages import HumanMessage, SystemMessage
1818
from langchain_core.tools import tool
1919
from uipath_langchain_client import get_chat_model, get_embedding_model
20-
from uipath_langchain_client.settings import get_default_client_settings
21-
22-
from uipath.llm_client.settings.constants import RoutingMode
20+
from uipath_langchain_client.settings import RoutingMode, get_default_client_settings
2321

2422

2523
def demo_basic_chat():

packages/uipath_langchain_client/src/uipath_langchain_client/clients/vertexai/chat_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def setup_uipath_client(self) -> Self:
4141
project_id="PLACEHOLDER",
4242
access_token="PLACEHOLDER",
4343
base_url=str(self.uipath_sync_client.base_url),
44-
default_headers=self.uipath_sync_client.headers,
44+
default_headers=dict(self.uipath_sync_client.headers),
4545
max_retries=0, # handled by the UiPath client
4646
http_client=self.uipath_sync_client,
4747
)
@@ -50,7 +50,7 @@ def setup_uipath_client(self) -> Self:
5050
project_id="PLACEHOLDER",
5151
access_token="PLACEHOLDER",
5252
base_url=str(self.uipath_async_client.base_url),
53-
default_headers=self.uipath_async_client.headers,
53+
default_headers=dict(self.uipath_async_client.headers),
5454
max_retries=0, # handled by the UiPath client
5555
http_client=self.uipath_async_client,
5656
)

0 commit comments

Comments
 (0)