Skip to content

feat(agent): forward model settings and skip forced tool_choice under Claude thinking [PC-4672] - #1017

Draft
tudormatei1 wants to merge 1 commit into
mainfrom
feat/model-specific-settings
Draft

feat(agent): forward model settings and skip forced tool_choice under Claude thinking [PC-4672]#1017
tudormatei1 wants to merge 1 commit into
mainfrom
feat/model-specific-settings

Conversation

@tudormatei1

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant