# Class ModelNameUtils

java.lang.Object
com.google.adk.utils.ModelNameUtils

public final class ModelNameUtils extends Object
Utility class for model names.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `canUseOutputSchemaWithTools(String modelString)`
  Returns true if the model supports using output schema together with tools.
  `static boolean`
  `isGemini2Model(String modelString)`
  `static boolean`
  `isGemini2OrAbove(@Nullable String modelString)`
  `static boolean`
  `isGeminiModel(String modelString)`
  `static boolean`
  `isInstanceOfGemini(Object o)`
  Checks whether an object is an instance of `Gemini`, by searching through its class hierarchy for a class whose name equals the hardcoded String name of Gemini class.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### isGeminiModel

    public static boolean isGeminiModel(String modelString)

  - ### isGemini2Model

    public static boolean isGemini2Model(String modelString)

  - ### isGemini2OrAbove

    public static boolean isGemini2OrAbove(@Nullable String modelString)

  - ### isInstanceOfGemini

    public static boolean isInstanceOfGemini(Object o)
    Checks whether an object is an instance of `Gemini`, by searching through its class hierarchy for a class whose name equals the hardcoded String name of Gemini class.

    This method can be used where the "real" instanceof check is not possible because the Gemini type is not known at compile time.

    Parameters:
      `o` - The object to check.
    Returns:
      true if object's class is `Gemini`, false otherwise.

  - ### canUseOutputSchemaWithTools

    public static boolean canUseOutputSchemaWithTools(String modelString)
    Returns true if the model supports using output schema together with tools.
    Parameters:
      `modelString` - The model name or path.
    Returns:
      true if output schema with tools is supported, false otherwise.