list-model-discovery

Description

Retrieves a list of models along with their capabilities, supported features, and deployment availability. Results can be filtered by attributes such as region, realm, model identifier, supported inference APIs, serving modes, and access type.

Usage

oci generative-ai model-discovery-collection list-model-discovery [OPTIONS]

Required Parameters

--compartment-id, -c [text]

The OCID of the compartment in which to list resources.

Optional Parameters

--all

Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.

--api-capability [text]

Filter models that support any of the specified API capabilities.

--capability [text]

A filter to return only resources their capability matches the given capability.

Accepted values are:

AUDIO_TO_AUDIO, AUDIO_TO_TEXT, CHAT, FINE_TUNE, IMAGE_TEXT_TO_IMAGE, IMAGE_TEXT_TO_TEXT, IMAGE_TEXT_TO_VIDEO, IMAGE_TO_IMAGE, REALTIME, TEXT_EMBEDDINGS, TEXT_GENERATION, TEXT_RERANK, TEXT_SUMMARIZATION, TEXT_TO_AUDIO, TEXT_TO_IMAGE, TEXT_TO_VIDEO
--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--is-dedicated-retired [boolean]

Filter models based on dedicated retirement status.

--is-deprecated [boolean]

If true, return only deprecated models; if false, exclude deprecated models.

--is-on-demand-retired [boolean]

Filter models based on on-demand retirement status.

--limit [integer]

For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. For important details about how pagination works, see List Pagination.

--model-access [text]

Filter models by access type.

Accepted values are:

HOSTED, PROXY
--model-id [text]

A filter to return only resources whose model identifier matches the given modelId.

--page [text]

For list pagination. The value of the opc-next-page response header from the previous “List” call. For important details about how pagination works, see List Pagination.

--page-size [integer]

When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.

--realm [text]

A filter to return only resources whose realm matches the given realm.

--region-parameterconflict [text]

A filter to return only resources whose region matches the given region.

--serving-mode [text]

A filter to return only resources whose serving modes match the given servingModes.

Accepted values are:

DEDICATED, ON_DEMAND

Example using required parameter

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration and appropriate security policies before trying the examples.

    export compartment_id=<substitute-value-of-compartment_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/generative-ai/model-discovery-collection/list-model-discovery.html#cmdoption-compartment-id

    oci generative-ai model-discovery-collection list-model-discovery --compartment-id $compartment_id