feat(agent): forward model settings and skip forced tool_choice under Claude thinking [PC-4672] - #1017
Draft
tudormatei1 wants to merge 1 commit into
Draft
feat(agent): forward model settings and skip forced tool_choice under Claude thinking [PC-4672]#1017tudormatei1 wants to merge 1 commit into
tudormatei1 wants to merge 1 commit into
Conversation
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.
Two related changes for model-specific settings.
chat_model_factory.get_chat_model gets a model_settings param that's forwarded to the new-client factory, so the provider-native settings.modelSettings from agent.json reaches the actual LLM call. Defaults to None, so the legacy client path is unaffected.
The ReAct graph gets a reasoning_enabled flag on AgentGraphConfig, threaded into the LLM node and router. When it's set, the graph stops forcing tool_choice="any" and stops raising THINKING_LIMIT_EXCEEDED on tool-less turns. This is for Claude with extended thinking: the Anthropic API rejects a forced tool_choice while thinking is on (400), and Claude's thinking blocks are legitimate tool-less turns that shouldn't trip the loop guard. The run is still bounded by llm_messages_limit. The flag is off by default, so every other model keeps the normal force-and-terminate behavior — importantly OpenAI, which allows forced tool_choice alongside reasoning and would otherwise loop.
Bumps the uipath-langchain-client pins to >=1.18.0,<1.19.0 (the model_settings param on get_chat_model only exists there) and the package to 0.14.18. Core uipath-llm-client is unchanged. The uv.lock regen is deferred until uipath-langchain-client 1.18.0 is on PyPI