Skip to content

Conversation

@antoniibelyshev
Copy link
Contributor

@antoniibelyshev antoniibelyshev commented Jan 6, 2026

Motivation and Context

Models without the tool choice capability (e.g. most of the ollama models) cannot rely on the toolChoice in the model api. This makes some workflows inconsistent, in particular, subgraphWithTask does not work with such models since it relies on the toolChoice parameter. This pr introduces a workaround for this issue using LLMBasedToolCallFixProcessor, which now will use prompts to force LLM to generate a tool when the toolChoice is set to Required.

Breaking Changes


Type of the changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tests improvement
  • Refactoring

Checklist

  • The pull request has a description of the proposed change
  • I read the Contributing Guidelines before opening the pull request
  • The pull request uses develop as the base branch
  • Tests for the changes have been added
  • All new and existing tests passed
Additional steps for pull requests adding a new feature
  • An issue describing the proposed change exists
  • The pull request includes a link to the issue
  • The change was discussed and approved in the issue
  • Docs have been added / updated

@antoniibelyshev antoniibelyshev force-pushed the belyshev/heuristic-required-tool-choice branch from 7044d4e to 6a896da Compare January 6, 2026 13:08
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Qodana for JVM

1257 new problems were found

Inspection name Severity Problems
Check Kotlin and Java source code coverage 🔶 Warning 1237
Missing KDoc for public API declaration 🔶 Warning 20
@@ Code coverage @@
+ 72% total lines covered
18184 lines analyzed, 13157 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@antoniibelyshev antoniibelyshev force-pushed the belyshev/heuristic-required-tool-choice branch from 3faa20d to f1b936d Compare January 12, 2026 10:18
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.

2 participants