Enum Class ModelTier

java.lang.Object
java.lang.Enum<ModelTier>
com.agentforge4j.llm.api.ModelTier
All Implemented Interfaces:
Serializable, Comparable<ModelTier>, Constable

public enum ModelTier extends Enum<ModelTier>
Capability tier an agent or step declares instead of a concrete, versioned model string. The runtime resolves a tier to a provider-specific model via ModelTierResolver at invocation time, so a model release becomes a configuration change rather than a bundle edit.

This is orchestration metadata; it is never part of the provider-facing LlmExecutionRequest. A raw model pin always takes precedence over a tier.

  • Enum Constant Details

    • LITE

      public static final ModelTier LITE
      Cheapest, fastest tier — suitable for routine, low-risk steps.
    • STANDARD

      public static final ModelTier STANDARD
      Balanced default tier — general-purpose capability and cost.
    • POWERFUL

      public static final ModelTier POWERFUL
      Strongest tier — for high-risk, review, generation, or reasoning-heavy steps.
  • Method Details

    • values

      public static ModelTier[] 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 ModelTier 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
    • fromName

      public static ModelTier fromName(String name)
      Parses a declared tier name into a ModelTier, trimming surrounding whitespace and upper-casing before matching. This is the single canonical tier-name parse shared by every caller (invocation and cost-estimate paths) so the accepted set of spellings can never drift between them. Callers decide how to surface a failure — the runtime rethrows as a hard ModelTierResolutionException; the estimate path catches it and emits a marker key.
      Parameters:
      name - the tier name; must not be blank. Matching is whitespace-tolerant and case-insensitive, but the trimmed, upper-cased value must equal a declared tier
      Returns:
      the matching tier; never null
      Throws:
      IllegalArgumentException - if name is blank or does not match a declared tier