Commit 48d06a7
Fix: lock use_responses_api to match discovered api_flavor
LangChain's ChatOpenAI auto-infers use_responses_api from parameters
like reasoning={}, model names (gpt-5-pro), context_management, etc.
This can silently switch a chat-completions-only model to the Responses
API, sending an incompatible payload format.
When api_flavor is locked:
- chat-completions → use_responses_api = False (prevents auto-switch)
- responses → use_responses_api = True (ensures correct format)
- None → use_responses_api stays None (dynamic auto-detect)
Also removes redundant use_responses_api logic from the factory since
the model class now handles it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2ad1473 commit 48d06a7
2 files changed
Lines changed: 12 additions & 3 deletions
File tree
- packages/uipath_langchain_client/src/uipath_langchain_client
- clients/openai
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
| |||
0 commit comments