Enum Class LLMCapability

java.lang.Object
java.lang.Enum<LLMCapability>
com.tnsai.enums.LLMCapability
All Implemented Interfaces:
Serializable, Comparable<LLMCapability>, Constable

public enum LLMCapability extends Enum<LLMCapability>
Declarative LLM capability flag for use on @RoleSpec(requires = {...}). Lets a role advertise the model features it actually exercises so the build-time validation pipeline (AGENT-V004, issue #238) can fail fast when the configured LLM doesn't support them — instead of letting the mismatch surface at the first chat call.

Each value maps 1:1 to a boolean accessor on com.tnsai.llm.LLMCapabilities, so the validator can simply look up llm.getCapabilities().supportsX() for whichever capabilities the role declared.

Lives in com.tnsai.enums (not com.tnsai.llm) so the @RoleSpec annotation can reference it without crossing the architecture boundary that forbids com.tnsai.annotations from depending on com.tnsai.llm.

FUNCTION_CALLING is intentionally absent — that case is already covered by AGENT-V003 (LLMCapabilityValidator function-calling branch), which fires whenever tools or ActionType.LLM actions are present regardless of any declarative annotation. Adding it here would create overlapping warnings.

Since:
0.8.5 (issue #238)
  • Enum Constant Details

    • STREAMING

      public static final LLMCapability STREAMING
      Model can stream tokens incrementally — needed for agent.streamChatWithTools(...). Maps to LLMCapabilities#supportsStreaming().
    • STRUCTURED_OUTPUT

      public static final LLMCapability STRUCTURED_OUTPUT
      Model can return structured JSON output mode (response_format with a JSON schema). Maps to LLMCapabilities#supportsStructuredOutput().
    • VISION

      public static final LLMCapability VISION
      Model accepts image inputs (multimodal). Maps to LLMCapabilities#supportsVision().
  • Method Details

    • values

      public static LLMCapability[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LLMCapability valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null