Commit 1ae8f0b
committed
Bug #5 — UiPathFireworksEmbeddings: self.model returned wrong model name
Without an explicit field override, Pydantic kept two separate fields:
FireworksEmbeddings.model (default 'nomic-ai/nomic-embed-text-v1.5') and
UiPathBaseLLMClient.model_name (populated by the caller via alias 'model').
self.model therefore always resolved to the stale FireworksEmbeddings default,
silently ignoring whatever model name the caller passed.
Fix: add model: str = Field(default='', alias='model_name') — the same override
pattern used by every other embedding class — to collapse the two fields into
one. Replace self.model with self.model_name in all four embed methods.
Bug #8 — UiPathEmbeddings: silent HTTP error swallowing + missing model field
Two issues in embed_documents / aembed_documents:
1. uipath_request / uipath_arequest were called without raise_status_error=True,
so HTTP 4xx/5xx responses were silently accepted. The subsequent
response.json()['data'] access would then raise a confusing KeyError or
AttributeError rather than a clear HTTP error.
2. The request body only contained {'input': texts}. The normalized API
requires a 'model' field for routing, matching the pattern already used
by the normalized chat model (_default_params includes 'model').
Fix: pass raise_status_error=True and add 'model': self.model_name to the
request body in both the sync and async paths.
1 parent dc78050 commit 1ae8f0b
2 files changed
Lines changed: 22 additions & 5 deletions
File tree
- packages/uipath_langchain_client/src/uipath_langchain_client/clients
- fireworks
- normalized
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | | - | |
| 59 | + | |
| 60 | + | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| |||
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
62 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
0 commit comments