Class AiModelSelection

java.lang.Object
org.freeplane.api.ai.AiModelSelection

public class AiModelSelection extends Object
Explicit provider/model choice or default-model marker inside an AiModelConfiguration.
Since:
1.13.3
  • Method Details

    • defaultModel

      public static AiModelSelection defaultModel()
      Selects the default model resolved by the request execution context.

      This is an explicit override, not the same as leaving model selection unset. In a saved prompt request it bypasses the saved prompt's explicit model selection while still allowing other model-configuration fields to inherit independently.

      Returns:
      default-model marker
    • explicit

      public static AiModelSelection explicit(String providerName, String modelName)
      Selects a specific provider/model pair.

      Both names are trimmed and must be non-blank. Availability is checked when the request starts.

      Parameters:
      providerName - provider identifier
      modelName - model identifier within the provider
      Returns:
      explicit model selection
    • isDefaultModel

      public boolean isDefaultModel()
      Returns whether this selection explicitly requests the default model.
      Returns:
      true for defaultModel()
    • getProviderName

      public String getProviderName()
      Returns the explicit provider name, or null for defaultModel().
      Returns:
      provider name, or null
    • getModelName

      public String getModelName()
      Returns the explicit model name, or null for defaultModel().
      Returns:
      model name, or null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object