Class ToolCallNotSupportedException

All Implemented Interfaces:
Serializable

public class ToolCallNotSupportedException extends LLMCapabilityException
Exception thrown when tools are sent to an LLM model that does not support function/tool calling.

This is a specific subtype of LLMCapabilityException for the most common capability mismatch: attempting to use tool calling with a model that doesn't support it.

Common scenarios:

  • Using older Ollama models (e.g., phi, orca) that lack function calling
  • Using text-only models that don't support structured tool interactions
  • Unknown models where capabilities default to no tool support

The exception message includes the model name, provider, and a suggestion for compatible models.

See Also:
  • Constructor Details

    • ToolCallNotSupportedException

      public ToolCallNotSupportedException(String model, String provider)
      Creates a ToolCallNotSupportedException.
      Parameters:
      model - the model identifier
      provider - the provider name
    • ToolCallNotSupportedException

      public ToolCallNotSupportedException(String model, String provider, Throwable cause)
      Creates a ToolCallNotSupportedException with a cause.
      Parameters:
      model - the model identifier
      provider - the provider name
      cause - the underlying cause
  • Method Details

    • getSuggestion

      public String getSuggestion()
      Returns the suggestion text for compatible models.