Package com.sap.ai.sdk.foundationmodels.openai

# Record Class OpenAiModel

java.lang.Object
java.lang.Record
com.sap.ai.sdk.foundationmodels.openai.OpenAiModel

Record Components:
  `name` - The name of the model.
  `version` - The version of the model (optional).

All Implemented Interfaces:
  `AiModel`

public record OpenAiModel(@Nonnull String name, @Nullable String version) extends Record implements AiModel
OpenAI models that are available in AI Core.

Please note that the template of models provided in this class might be outdated. To check the latest availability of OpenAI models in AI Core, please refer to SAP Availability of Generative AI Models .

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final OpenAiModel`
  `DALL_E_3`
  Deprecated.
  This model is deprecated on AI Core.
  `static final OpenAiModel`
  `GPT_35_TURBO`
  Deprecated.
  This model is deprecated on AI Core with a planned retirement on 2025-02-13.
  `static final OpenAiModel`
  `GPT_35_TURBO_1025`
  Deprecated.
  This model is deprecated on AI Core with a planned retirement on 2025-02-22.
  `static final OpenAiModel`
  `GPT_35_TURBO_16K`
  Deprecated.
  This model is deprecated on AI Core with a planned retirement on 2025-02-13.
  `static final OpenAiModel`
  `GPT_4`
  Deprecated.
  This model is deprecated on AI Core with a planned retirement on 2025-09-01.
  `static final OpenAiModel`
  `GPT_4_32K`
  Deprecated.
  This model is deprecated on AI Core.
  `static final OpenAiModel`
  `GPT_41`
  Azure OpenAI GPT-4.1 model
  `static final OpenAiModel`
  `GPT_41_MINI`
  Azure OpenAI GPT-4.1-mini model
  `static final OpenAiModel`
  `GPT_41_NANO`
  Azure OpenAI GPT-4.1-nano model
  `static final OpenAiModel`
  `GPT_4O`
  Azure OpenAI GPT-4o model
  `static final OpenAiModel`
  `GPT_4O_MINI`
  Deprecated.
  This model is deprecated on AI Core.
  `static final OpenAiModel`
  `GPT_5`
  Azure OpenAI GPT-5 model
  `static final OpenAiModel`
  `GPT_5_MINI`
  Azure OpenAI GPT-5-mini model
  `static final OpenAiModel`
  `GPT_5_NANO`
  Azure OpenAI GPT-5-nano model
  `static final OpenAiModel`
  `GPT_52`
  Azure OpenAI GPT-5.2 model
  `static final OpenAiModel`
  `GPT_53_CODEX`
  Azure OpenAI GPT-5.3-codex model
  `static final OpenAiModel`
  `GPT_54`
  Azure OpenAI GPT-5.4 model
  `static final OpenAiModel`
  `GPT_54_NANO`
  Azure OpenAI GPT-5.4-nano model
  `static final OpenAiModel`
  `GPT_55`
  Azure OpenAI GPT-5.5 model
  `static final OpenAiModel`
  `GPT_REALTIME`
  Azure OpenAI GPT-5-nano model
  `static final OpenAiModel`
  `O1`
  Deprecated.
  This model is deprecated on AI Core.
  `static final OpenAiModel`
  `O3`
  Azure OpenAI GPT-o3 model
  `static final OpenAiModel`
  `O3_MINI`
  Deprecated.
  This model is deprecated on AI Core.
  `static final OpenAiModel`
  `O4_MINI`
  Azure OpenAI GPT-o4 Mini model
  `static final OpenAiModel`
  `TEXT_EMBEDDING_3_LARGE`
  Azure OpenAI Text Embedding 3 Large model
  `static final OpenAiModel`
  `TEXT_EMBEDDING_3_SMALL`
  Azure OpenAI Text Embedding 3 Small model
  `static final OpenAiModel`
  `TEXT_EMBEDDING_ADA_002`
  Deprecated.
  This model is deprecated on AI Core with a planned retirement on 2025-10-03.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenAiModel(String name, String version)`
  Creates an instance of a `OpenAiModel` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `String`
  `name()`
  Returns the value of the `name` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `String`
  `version()`
  Returns the value of the `version` record component.
  `OpenAiModel`
  `withVersion(String version)`
  Create a new instance of OpenAiModel with the provided version.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### DALL_E_3

    @Deprecated public static final OpenAiModel DALL_E_3
    Deprecated.
    This model is deprecated on AI Core.
    internal [Azure OpenAI dall-e-3 model]

  - ### GPT_35_TURBO

    @Deprecated public static final OpenAiModel GPT_35_TURBO
    Deprecated.
    This model is deprecated on AI Core with a planned retirement on 2025-02-13. The suggested replacement model is `GPT_4O_MINI`.
    Azure OpenAI GPT-3.5 Turbo model

  - ### GPT_35_TURBO_1025

    @Deprecated public static final OpenAiModel GPT_35_TURBO_1025
    Deprecated.
    This model is deprecated on AI Core with a planned retirement on 2025-02-22. The suggested replacement model is `GPT_4O_MINI`.
    Azure OpenAI GPT-3.5 Turbo model

  - ### GPT_35_TURBO_16K

    @Deprecated public static final OpenAiModel GPT_35_TURBO_16K
    Deprecated.
    This model is deprecated on AI Core with a planned retirement on 2025-02-13. The suggested replacement model is `GPT_4O_MINI`.
    Azure OpenAI GPT-3.5 Turbo model

  - ### GPT_4

    @Deprecated public static final OpenAiModel GPT_4
    Deprecated.
    This model is deprecated on AI Core with a planned retirement on 2025-09-01. The suggested replacement model is `GPT_4O` or `GPT_41`.
    Azure OpenAI GPT-4 model

  - ### GPT_4_32K

    @Deprecated public static final OpenAiModel GPT_4_32K
    Deprecated.
    This model is deprecated on AI Core.
    Azure OpenAI GPT-4 model

  - ### GPT_4O

    public static final OpenAiModel GPT_4O
    Azure OpenAI GPT-4o model

  - ### GPT_4O_MINI

    @Deprecated public static final OpenAiModel GPT_4O_MINI
    Deprecated.
    This model is deprecated on AI Core. The suggested replacement model is `GPT_5_MINI`.
    Azure OpenAI GPT-4o Mini model

  - ### O3_MINI

    @Deprecated public static final OpenAiModel O3_MINI
    Deprecated.
    This model is deprecated on AI Core.
    Azure OpenAI GPT-o3 Mini model

  - ### O1

    @Deprecated public static final OpenAiModel O1
    Deprecated.
    This model is deprecated on AI Core.
    Azure OpenAI GPT-o1 model

  - ### TEXT_EMBEDDING_3_LARGE

    public static final OpenAiModel TEXT_EMBEDDING_3_LARGE
    Azure OpenAI Text Embedding 3 Large model

  - ### TEXT_EMBEDDING_3_SMALL

    public static final OpenAiModel TEXT_EMBEDDING_3_SMALL
    Azure OpenAI Text Embedding 3 Small model

  - ### O4_MINI

    public static final OpenAiModel O4_MINI
    Azure OpenAI GPT-o4 Mini model

  - ### O3

    public static final OpenAiModel O3
    Azure OpenAI GPT-o3 model

  - ### GPT_41

    public static final OpenAiModel GPT_41
    Azure OpenAI GPT-4.1 model

  - ### GPT_41_NANO

    public static final OpenAiModel GPT_41_NANO
    Azure OpenAI GPT-4.1-nano model

  - ### GPT_41_MINI

    public static final OpenAiModel GPT_41_MINI
    Azure OpenAI GPT-4.1-mini model

  - ### GPT_5

    public static final OpenAiModel GPT_5
    Azure OpenAI GPT-5 model

  - ### GPT_5_MINI

    public static final OpenAiModel GPT_5_MINI
    Azure OpenAI GPT-5-mini model

  - ### GPT_5_NANO

    public static final OpenAiModel GPT_5_NANO
    Azure OpenAI GPT-5-nano model

  - ### GPT_REALTIME

    public static final OpenAiModel GPT_REALTIME
    Azure OpenAI GPT-5-nano model

  - ### GPT_52

    public static final OpenAiModel GPT_52
    Azure OpenAI GPT-5.2 model

  - ### GPT_53_CODEX

    public static final OpenAiModel GPT_53_CODEX
    Azure OpenAI GPT-5.3-codex model

  - ### GPT_54

    public static final OpenAiModel GPT_54
    Azure OpenAI GPT-5.4 model

  - ### GPT_54_NANO

    public static final OpenAiModel GPT_54_NANO
    Azure OpenAI GPT-5.4-nano model

  - ### GPT_55

    public static final OpenAiModel GPT_55
    Azure OpenAI GPT-5.5 model

  - ### TEXT_EMBEDDING_ADA_002

    @Deprecated public static final OpenAiModel TEXT_EMBEDDING_ADA_002
    Deprecated.
    This model is deprecated on AI Core with a planned retirement on 2025-10-03. The suggested replacement models are `TEXT_EMBEDDING_3_SMALL` and `TEXT_EMBEDDING_3_LARGE`.
    Azure OpenAI Text Embedding ADA 002 model

- ## Constructor Details

  - ### OpenAiModel

    public OpenAiModel(@Nonnull String name, @Nullable String version)
    Creates an instance of a `OpenAiModel` record class.
    Parameters:
      `name` - the value for the `name` record component
      `version` - the value for the `version` record component

- ## Method Details

  - ### withVersion

    @Nonnull public OpenAiModel withVersion(@Nonnull String version)
    Create a new instance of OpenAiModel with the provided version.
    Parameters:
      `version` - The version of the model.
    Returns:
      The new instance of OpenAiModel.

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with `Objects::equals(Object,Object)`.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### name

    @Nonnull public String name()
    Returns the value of the `name` record component.
    Specified by:
      `name` in interface `AiModel`
    Returns:
      the value of the `name` record component

  - ### version

    @Nullable public String version()
    Returns the value of the `version` record component.
    Specified by:
      `version` in interface `AiModel`
    Returns:
      the value of the `version` record component