Free cookie consent management tool by TermsFeed

a!genAiModels() Function

On This Page

Function

Returns a list of the generative AI models that are available for use with AI skills in your environment.

You can use this function to build development and administrative tools that display available generative AI models, helping you manage your AI-powered applications with greater transparency.

The function returns a list of maps, where each map provides metadata like model name and ID of a generative AI model.

Parameters

This function does not have any parameters.

Returns

List of Maps

For example, the function might return the following list:

1
2
3
4
5
6
7
8
9
10
{
  a!map(
    name: "Claude Sonnet 4.5",
    id: "appian/anthropic.claude-sonnet-4-5-20250929-v1:0",
  ),
  a!map(
    name: "Claude Haiku 4.5",
    id: "appian/anthropic.claude-haiku-4-5-20251001-v1:0",
  )
}

Considerations

Keep the following points in mind when using this function:

  • The list of available models is specific to the environment where the function is executed.
  • If your environment uses a cross-region configuration, the function returns the generative AI models available in that region.
  • Some models require a corresponding inference profile to be configured in the Admin Console. The function only returns these models if an administrator has selected an inference profile, which enables the model for use in the environment.

Example

This example shows how to use the rich text display component and a!genAiModels() to display the returned list of model names. This can be useful for developers and administrators to quickly see which models are available in an environment.

1
2
3
4
5
6
7
8
9
10
11
12
a!localVariables(
  local!models: a!genAiModels(),
  a!richTextDisplayField(
    label: "Available Generative AI Models",
    value: a!richTextBulletedList(
      items: a!forEach(
        items: local!models,
        expression: fv!item.name
      )
    )
  )
)

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Incompatible
Offline Mobile Incompatible
Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Incompatible

Cannot be used to configure a process report.

Process Events Incompatible

Cannot be used to configure a process event node, such as a start event or timer event.

Process Autoscaling Incompatible

Cannot be used in autoscaled processes.

Feedback