Add normalization for required tools

Created on 15 September 2025, 19 days ago
Updated 16 September 2025, 18 days ago

Problem/Motivation

One of the issue that can happen quite often in Agents is that even with well constructed prompts, the actual choices made by the agent might not be consistent enough for a production ready agents.

If you for instance know that tool A, should always run first no matter what or if you know that tool B always runs after tool A has been run, we should have a feature to force this.

This can be done in certain providers via tool choice.

See for instance:

We should add a normalization value for this in the ChatInput object.

Proposed resolution

  • Research the providers, to see if there is anything outside of how OpenAI does it, that needs implementation.
  • (Suggestion) Create a ToolChoice object (and maybe interface), that takes Mode and Allowed Tools, where Mode is optional and set to auto by default.
  • Add to the ChatInput a getToolChoice and setToolChoice. Make sure that either setToolChoice can take NULL or that we also have a removeToolChoice, since a ChatInput might be changed in another loop.
  • (Optional) Since we are getting so many new getters that are not part of the constructors, we should let it return it self, so you can chain an object.
  • Document it
Feature request
Status

Active

Version

1.2

Component

AI Core module

Created by

🇩🇪Germany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024