View this page in the latest version of Appian. a!genAiModels() Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page 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 a!genAiModels() function returns a list of maps, where each map provides metadata about a generative AI model. This metadata includes the model name, provider, unique identifier, extended thinking support, maximum context window, and per-model file processing limits broken out by execution mode. Parameters This function does not have any parameters. Returns List of Maps Each map contains the following keys: name (Text): The display name of the model. provider (Text): The display name of the provider. The value depends on where the model is hosted: Model hosting provider value Appian-managed models "Appian" AWS-hosted models "Amazon Web Services" Azure-hosted models "Microsoft Azure" Google Cloud-hosted models "Google Cloud Platform" Custom provider models The name configured by your administrator id (Text): The unique identifier for the model. The prefix indicates the provider: Model hosting id prefix Appian-managed models appian/ AWS-hosted models aws/ Azure-hosted models azure/ Google Cloud-hosted models gcp/ Custom provider models custom/, such as custom/550e8400-e29b-41d4-a716-446655440000 extendedThinkingSupported (Boolean): Whether the model supports extended thinking. Returns true if the model can use extended thinking, false otherwise. extendedThinkingForced (Boolean): Whether extended thinking is mandatory for the model and cannot be disabled. Returns true if extended thinking is always active, false otherwise. contextWindow (Number): The model's maximum context window, in tokens. The context window is the total number of tokens the model can process in a single request, including the prompt, the examples, the input, and the generated output. executionModes (Map of Maps): A map of execution modes the model supports. Each mode key maps to a nested map of file types and their processing limits. See Execution modes structure for details. Execution modes structure The executionModes key contains a map where each key is an execution mode that the model supports. The following execution mode keys are possible: Mode key Description Corresponds to "text" Text-only document processing "Text only" mode in the AI skill designer "visual" Visual elements and text processing "Visual elements & text" mode in the AI skill designer "email" Email file processing Email-based generative AI skills "spreadsheet" Spreadsheet file processing Spreadsheet extraction skill Each execution mode maps to a nested map of file type keys. File type keys represent file formats, not extensions—for example, "jpeg" applies to both .jpeg and .jpg files. Each file type key (such as "pdf", "tiff", "jpeg", "xlsx") maps to a map containing some or all of the following limit keys: Key Type Description fileSizeLimitBytes Number Maximum file size in bytes. filePageLimit Number Maximum number of pages. pageSizeLimitBytes Number Maximum size per page in bytes. sheetLimit Number Maximum number of sheets (spreadsheet mode only). cellLimit Number Maximum number of cells (spreadsheet mode only). columnLimit Number Maximum columns per sheet (spreadsheet mode only). rowLimit Number Maximum rows per sheet (spreadsheet mode only). Sample output The following examples show the structure returned by a!genAiModels() for model entries. The first example shows an Anthropic Claude model, and the second shows an Appian GPT model. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 a!map( name: "Claude Sonnet 5", provider: "Appian", id: "appian/anthropic.claude-sonnet-5", extendedThinkingSupported: true, extendedThinkingForced: false, contextWindow: 200000, executionModes: a!map( text: a!map( pdf: a!map(fileSizeLimitBytes: 26214400, filePageLimit: 100, pageSizeLimitBytes: 10485760), tiff: a!map(fileSizeLimitBytes: 18874368, filePageLimit: 100, pageSizeLimitBytes: 10485760), docx: a!map(fileSizeLimitBytes: 4718592), jpeg: a!map(fileSizeLimitBytes: 10485760), png: a!map(fileSizeLimitBytes: 10485760), txt: a!map(fileSizeLimitBytes: 4718592), md: a!map(fileSizeLimitBytes: 4718592), html: a!map(fileSizeLimitBytes: 4718592) ), visual: a!map( pdf: a!map(fileSizeLimitBytes: 25165824, filePageLimit: 100, pageSizeLimitBytes: 10485760), tiff: a!map(fileSizeLimitBytes: 18874368, filePageLimit: 20, pageSizeLimitBytes: 10485760), jpeg: a!map(fileSizeLimitBytes: 3932160), png: a!map(fileSizeLimitBytes: 3932160) ), email: a!map( eml: a!map(fileSizeLimitBytes: 26214400) ), spreadsheet: a!map( xlsx: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 100, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000), xls: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 100, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000), xlsm: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 100, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000), csv: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 1, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000) ) ) ) The following example shows the structure for a GPT model available when Appian is selected as the cloud provider. Appian GPT models use the appian/openai. prefix in their model ID. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 a!map( name: "GPT 5.5", provider: "Appian", id: "appian/openai.gpt-5.5", extendedThinkingSupported: true, extendedThinkingForced: true, contextWindow: 272000, executionModes: a!map( text: a!map( pdf: a!map(fileSizeLimitBytes: 26214400, filePageLimit: 100), tiff: a!map(fileSizeLimitBytes: 18874368, filePageLimit: 100), docx: a!map(fileSizeLimitBytes: 4718592), jpeg: a!map(fileSizeLimitBytes: 10485760), png: a!map(fileSizeLimitBytes: 10485760), txt: a!map(fileSizeLimitBytes: 4718592), md: a!map(fileSizeLimitBytes: 4718592), html: a!map(fileSizeLimitBytes: 4718592) ), visual: a!map( pdf: a!map(fileSizeLimitBytes: 25165824, filePageLimit: 100), tiff: a!map(fileSizeLimitBytes: 18874368, filePageLimit: 20), jpeg: a!map(fileSizeLimitBytes: 3932160), png: a!map(fileSizeLimitBytes: 3932160) ), email: a!map( eml: a!map(fileSizeLimitBytes: 26214400) ), spreadsheet: a!map( xlsx: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 100, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000), xls: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 100, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000), xlsm: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 100, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000), csv: a!map(fileSizeLimitBytes: 10485760, sheetLimit: 1, cellLimit: 2000000, columnLimit: 200, rowLimit: 40000) ) ) ) Using the function The following sections cover important details about the a!genAiModels() function. Execution modes vary by model The a!genAiModels() function returns only the execution modes that a model supports. Not all models support all execution modes. If a model does not support a particular mode, that mode key does not appear in the executionModes map. For example, a model that only supports text extraction and email processing returns an executionModes map with only the "text" and "email" keys. Check for the existence of a mode key before attempting to access its nested values. Limit values reflect current enforcement The limit values returned by a!genAiModels() reflect the enforced limits for each model. All size values are in bytes. If Appian updates a model's limits, the function automatically returns the new values without requiring any code changes. The function response is cached for up to 30 minutes. Changes to model limits are reflected in the function response within that caching window. Environment-specific model availability The list of available models is specific to the environment where the function is executed. A model only appears in the results if its corresponding provider account is active and the specific model has been enabled by an administrator in the Admin Console. The models returned by a!genAiModels() are the same models available for selection in the AI agent's model configuration. However, the AI agent filters the list further to show only models that support AI agent capabilities (tool use). If your environment uses a cross-region configuration, the function returns only the generative AI models that are available in the selected region. This includes models natively available in the environment's region and models enabled through processing regions. Processing regions and model visibility Some models require a corresponding processing region to be configured in the Admin Console. The a!genAiModels() function only returns these models if an administrator has selected a processing region, which enables the model for use in the environment. AI usage tracking All models returned by a!genAiModels() count toward AI usage tracking and limits. Examples The following examples demonstrate the a!genAiModels() function. Display all available models This example shows how to use the rich text display component and a!genAiModels() to display available models. 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 a!richTextDisplayField( label: "Available Models", value: a!richTextBulletedList( items: a!forEach( items: a!genAiModels(), expression: fv!item.provider & " - " & fv!item.name ) ) ) Distinguish BYO Azure models from Appian models This example filters the model list by the provider property to separate BYO Azure models from Appian-managed models. Use this pattern to build administrative tools that surface where each model is hosted. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 a!localVariables( local!customModels: index( a!genAiModels(), wherecontains("Microsoft Azure", a!genAiModels().provider) ), local!appianModels: index( a!genAiModels(), wherecontains("Appian", a!genAiModels().provider) ), a!sectionLayout( contents: { a!richTextDisplayField( label: "BYO Azure Models", value: a!richTextBulletedList( items: a!forEach( items: local!customModels, expression: fv!item.provider & " — " & fv!item.name ) ) ), a!richTextDisplayField( label: "Appian Models", value: a!richTextBulletedList( items: a!forEach( items: local!appianModels, expression: fv!item.provider & " — " & fv!item.name ) ) ) } ) ) Filter models to the Google Cloud Platform provider This example filters the model list to show only BYO Google Cloud models by matching the "Google Cloud Platform" provider value. Use this pattern to build administrative tools that surface Google Cloud models separately from other providers. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 a!localVariables( local!cloudModels: index( a!genAiModels(), wherecontains("Google Cloud", a!genAiModels().provider) ), a!richTextDisplayField( label: "BYO Google Cloud Models", value: a!richTextBulletedList( items: a!forEach( items: local!cloudModels, expression: fv!item.name & " (ID: " & fv!item.id & ")" ) ) ) ) Filter Appian GPT models by ID prefix This example filters the model list to show only Appian-managed GPT models by matching the appian/openai. prefix in the model ID. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 a!localVariables( local!allModels: a!genAiModels(), local!appianGptModels: index( local!allModels, where( a!forEach( items: local!allModels, expression: find("appian/openai.", fv!item.id) = 1 ) ) ), a!richTextDisplayField( label: "Appian GPT Models", value: a!richTextBulletedList( items: a!forEach( items: local!appianGptModels, expression: fv!item.name & " (ID: " & fv!item.id & ")" ) ) ) ) Retrieve file size limits for a specific model and execution mode This example shows how to access per-model file processing limits dynamically. The expression retrieves the PDF file size limit for the "text" execution mode of a selected model. Use this pattern to build dynamic validation logic that checks file constraints before submitting documents to an AI skill. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a!localVariables( local!selectedModel: index(a!genAiModels(), wherecontains("appian/anthropic.claude-sonnet-4-6", a!genAiModels().id))[1], /* Access the PDF limit for the text execution mode */ local!textPdfLimits: local!selectedModel.executionModes.text.pdf, a!paragraphField( label: "PDF Limits (Text Mode) for " & local!selectedModel.name, readOnly: true, value: { "Max file size: " & local!textPdfLimits.fileSizeLimitBytes / 1048576 & " MB", char(10), "Max pages: " & local!textPdfLimits.filePageLimit } ) ) Validate file size against model limits before submission This example demonstrates how to use the limits from a!genAiModels() to validate a user-uploaded document before submitting it to an AI skill. The interface checks whether the file exceeds the selected model's size limit and displays a warning if it does. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 a!localVariables( local!allModels: a!genAiModels(), local!selectedModelIndex: 1, local!selectedModel: local!allModels[local!selectedModelIndex], local!uploadedFileSize: 15728640, /* Example: 15 MB file */ local!mode: "text", local!fileType: "pdf", /* Get the limit for the selected model, mode, and file type */ local!limit: index( index( index(local!selectedModel.executionModes, local!mode, a!map()), local!fileType, a!map() ), "fileSizeLimitBytes", 0 ), local!exceedsLimit: local!uploadedFileSize > local!limit, a!sectionLayout( contents: { a!richTextDisplayField( label: "File Validation", value: if( local!exceedsLimit, a!richTextItem( text: "File exceeds the " & local!selectedModel.name & " limit of " & local!limit / 1048576 & " MB for " & local!fileType & " files in " & local!mode & " mode.", style: "STRONG" ), a!richTextItem( text: "File is within the model's size limits.", style: "EMPHASIS" ) ) ) } ) ) Feature compatibility The table below lists this function's compatibility with various features in Appian. Feature Compatibility Note Portals Incompatible Offline Interfaces 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. Event Consumer Filter Conditions Incompatible Cannot be used in filter conditions. Event Consumer Event Handlers Incompatible Cannot be used in event handler expressions. Feedback Was this page helpful? SHARE FEEDBACK Loading...