feat(langchain): forward provider-native modelSettings to chat models [PC-4672] - #119
Open
tudormatei1 wants to merge 6 commits into
Open
feat(langchain): forward provider-native modelSettings to chat models [PC-4672]#119tudormatei1 wants to merge 6 commits into
tudormatei1 wants to merge 6 commits into
Conversation
tudormatei1
temporarily deployed
to
LLMGW_SETTINGS
July 31, 2026 11:49 — with
GitHub Actions
Inactive
tudormatei1
force-pushed
the
feat/model-specific-settings
branch
from
August 13, 2026 15:39
5c6a487 to
e36dfd3
Compare
tudormatei1
marked this pull request as ready for review
August 13, 2026 15:45
tudormatei1
requested review from
DragosBobolea,
cosminacho,
cristipufu,
dragosvelcea,
ionmincu,
ionut-mihalache-uipath,
radu-mocanu and
vldcmp-uipath
as code owners
August 13, 2026 15:45
tudormatei1
had a problem deploying
to
LLMGW_SETTINGS
August 13, 2026 15:45 — with
GitHub Actions
Failure
tudormatei1
had a problem deploying
to
LLMGW_SETTINGS
August 13, 2026 15:55 — with
GitHub Actions
Failure
tudormatei1
force-pushed
the
feat/model-specific-settings
branch
from
August 18, 2026 08:29
76daab5 to
5520197
Compare
tudormatei1
had a problem deploying
to
LLMGW_SETTINGS
August 18, 2026 08:30 — with
GitHub Actions
Failure
tudormatei1
had a problem deploying
to
LLMGW_SETTINGS
August 18, 2026 08:59 — with
GitHub Actions
Failure
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR introduces provider-native model_settings support so settings from agent.json can be forwarded through get_chat_model and applied during model construction (including Bedrock Converse-specific routing), with accompanying tests and a version bump.
Changes:
- Add
model_settingsparameter toget_chat_modeland forward it into the model constructor. - Apply
model_settingsonUiPathBaseChatModelpost-construction with type coercion, plus Bedrock Converse passthrough partitioning. - Add/extend unit tests for forwarding, coercion, disabled params, alias handling, and Bedrock Converse mapping; bump version + changelog.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/langchain/features/test_factory_function.py | Adds integration-style tests verifying model_settings forwarding and application semantics across providers. |
| tests/langchain/clients/bedrock/test_model_settings_mapping.py | Adds pure unit tests for Bedrock Converse model_settings partitioning behavior. |
| packages/uipath_langchain_client/src/uipath_langchain_client/factory.py | Adds model_settings param to factory and forwards it into constructor kwargs. |
| packages/uipath_langchain_client/src/uipath_langchain_client/clients/bedrock/chat_models.py | Adds Bedrock Converse-specific routing of settings into additional_model_request_fields. |
| packages/uipath_langchain_client/src/uipath_langchain_client/base_client.py | Adds model_settings field and post-init application logic with type coercion + alias resolution. |
| packages/uipath_langchain_client/src/uipath_langchain_client/version.py | Bumps package version to 1.18.0. |
| packages/uipath_langchain_client/CHANGELOG.md | Documents the new model_settings capability and behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tudormatei1
had a problem deploying
to
LLMGW_SETTINGS
August 18, 2026 15:09 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
agent.jsoncan now carrysettings.modelSettings, but nothing consumed it — this is the consumer side.UiPathBaseChatModelgets amodel_settingsfield andget_chat_modela matching param; each key is applied verbatim, with no per-provider mapping, since discovery is the source of truth for the shape.A key that names a native field (by name or alias, e.g.
timeout->request_timeout) is coerced to that field's declared type and set; anything else goes tomodel_kwargs; keys indisabled_paramsare dropped. Values arrive as untyped JSON, so a value the field can't accept fails at construction rather than coming back as a provider 400.Two things worth a look: the coercion goes through a
TypeAdapterinstead of pydantic assignment validation, because re-running the validator chain lets LangChain'sbuild_extrasweep cached non-field entries intomodel_kwargs. AndUiPathChatBedrockConverseoverrides the apply step — Converse ignoresmodel_kwargsentirely, so non-field keys (plusoutput_config, which is a field but has to be nested anyway) go intoadditional_model_request_fields.