Member Junction
    Preparing search index...

    Function ResolveToolChoiceForRequest

    • The caller's tool choice, made valid for the tools going out and for the selected model.

      • A choice that names a tool must name one on the request; every provider rejects a forced call to an undeclared tool. The agent forces complete_task on its final turn without knowing the selected model's control flow, and under the hybrid that control tool is stripped, so the choice becomes 'none': the envelope turn the hybrid owes.
      • A model whose catalog sets LLM.SupportsForcedToolChoice to false rejects any forced choice (a named tool or 'required'), so it gets 'auto' and the prompt is what steers it.

      Parameters

      Returns ChatToolChoice

      The tool choice to send