ModelReleaseStage

@Retention(value = AnnotationRetention.SOURCE)
@IntDef(value = [0, 1])
public annotation ModelReleaseStage


Defines the release stage preference for model selection.

Summary

Constants

static final int

Selects the latest model version in the preview stage.

static final int
STABLE = 0

Selects the latest model version in the stable stage.

Public constructors

Constants

PREVIEW

public static final int PREVIEW = 1

Selects the latest model version in the preview stage. May include beta features.

  • Note: During transition periods—specifically when a previous preview model reaches stability but a successor has not yet been introduced, the preview stage may point to the same model version as the STABLE stage.

  • Note: Preview models may not be available on all devices. It is recommended to check the availability of the desired ModelConfig on the target device by using the GenerativeModel.checkStatus() method after attempting to get the client.

STABLE

public static final int STABLE = 0

Selects the latest model version in the stable stage. Recommended for production. This is the default.

Public constructors

ModelReleaseStage

public ModelReleaseStage()