AI Settings

Authenticate CAST Imaging with an AI provider, enable the AI driven features used when exploring results, and configure the embedding provider used by GraphRAG

Overview

CAST Imaging integrates with AI technology to provide an automated AI driven explanation of objects materialized during an application analysis. You can find out more details about using AI services in Leverage AI services.

Two things are configured on this page:

  • Primary AI provider - the provider and model used by all AI driven features to generate their responses.
  • Embedding provider and model - used by GraphRAG to build a semantic knowledge graph. This can be the same provider as the primary AI provider, or a different one.

CAST supports the following AI providers:

Configuring a provider

CAST Imaging supports two methods of authenticating with an AI provider:

  • API key / provider configuration - the default method, described below, where you enter an API key and/or the configuration data required by your chosen provider.
  • OAuth 2.0 -
    Available in ≥ 3.6.4-funcrel
    an alternative method, for connecting to an LLM endpoint (for example, your organization’s LLM gateway) that requires OAuth 2.0 authentication. See Authenticating with OAuth 2.0.

Authenticating with API key

Choose the provider and enter the required configuration values, then click Save Configuration:

The following is required:

Provider Required
OpenAI
  • API key
  • Access to api.openai.com (port 443)
Azure OpenAI
  • API Key
  • Endpoint URL: usually this will take the form https://<app_name>.openai.azure.com
  • Deployment Name: usually this will take the form <app_name>
CAST recommends using the gpt-35-turbo or gpt-4 models.
Ollama AI
  • Endpoint URL: usually this will take the form http://<local_server>:11434
  • Model Name: use the following URL to determine your chosen model name: http://local_server:11434/api/tags - the minimum model required is llama3.3:70b-instruct-q8_0
Vertex AI
  • Model Name: this will take the form <model_name> - CAST highly recommends the Gemini-1.5 Pro model
  • Location: usually this will be set to us-central1 but this may depend on your Google deployment location
  • Service Account Details: this is your IAM/Admin service account key exported to .json format
AWS Bedrock
  • Access Key/Secret Key: an AWS IAM credential combination
  • Location: this is the AWS region your services are hosted in, for example us-east-1
  • Model ID: enter your chosen LLM provider’s model ID. For example for Anthropic Claude Sonnet 3:

Claude AI Quotas and Throttling (Important Notes)

When invoking Claude AI models through AWS Bedrock, you’re subject to model-specific invocation limits. Below are the minimum recommended starting quotas for Claude 3.5 Sonnet, suitable for most general-purpose integrations:
  • On-demand InvokeModel Requests/Minute: 20
  • On-demand Token Limit/Minute: 200,000
  • Cross-region Requests/Minute: 40
  • Cross-region Token Limit/Minute: 400,000
These values represent quotas that AWS provides. Depending on your usage patterns, application scale, or throughput requirements, these limits can be increased by submitting a request to AWS Support. If you experience throttling (e.g., ThrottlingException), it’s likely due to hitting one of the above thresholds. Additionally, AWS allows for short burst rates beyond the standard quotas. However, sustained traffic above these values will trigger throttling unless higher limits are granted.
Google Gemini
  • API key
  • Model
Claude AI
Available in ≥ 3.6.6-funcrel
  • API key: your Anthropic API key
  • Model Name: the model ID of the Claude model you want to use - see Anthropic’s model overview for the available model IDs
  • Access to api.anthropic.com (port 443)

Authenticating with OAuth 2.0

Available in ≥ 3.6.4-funcrel

Instead of an API key, you can choose to authenticate with OAuth 2.0. This method uses the OAuth 2.0 client credentials flow to obtain a bearer token, and is intended for connecting CAST Imaging to an LLM endpoint - for example, your organization’s LLM gateway - that requires OAuth 2.0 authentication.

The following is required:

OAuth 2.0 Credentials

Field Required Description
Token Endpoint URL The OAuth 2.0 token URL used to obtain the bearer token, for example https://login.microsoftonline.com/{tenant}/oauth2/v2.0/tokenexternal link.
Client ID The OAuth 2.0 client identifier.
Client Secret The OAuth 2.0 client secret. This value is masked on input and stored encrypted in the backend, in the same way as an API key.
Scopes One or more OAuth 2.0 scopes, entered as a comma-separated list.
Audience The intended audience of the token, where required by your authorization server.

LLM Endpoint Configuration

Field Required Description
LLM Endpoint URL The target LLM API endpoint that CAST Imaging will call with the bearer token.
Custom Headers One or more additional HTTP headers, entered as key/value pairs, that CAST Imaging will include on each request to the LLM Endpoint URL. Use this when your LLM gateway requires extra headers - for example a routing, version or subscription header such as X-Gateway-Route or api-version - in addition to the OAuth 2.0 bearer token.

Enabling AI features

When a valid API key or configuration data is defined, the various AI feature toggles will become available. Use the check boxes to enable the features you require:

Option Description
Explain code with AI Enables right click contextual menu options when consulting results and working at Object level - with options providing explanations directly in the source code:

Assistant chatbot Enables the Ask me anything feature within the Imaging Assistant located in the lower right corner when consulting results (note that the Summarize with AI option will remain disabled - it is enabled via the AI Summary option explained below):

AI Summary Enables two features that can generate an AI driven explanation of items in your application, displayed in a Post-It:

  • Summarize with AI: generates an AI-driven explanation of items in the Application, Transaction, Data Call Graph and Module scopes, saving to a Post-It available via a tab in the Imaging Assistant:



  • Bulk AI Summary: generates an AI driven explanation of a given module, transaction, data-call graph, service or project structure, available via the Customize my results option. See also Using the Bulk AI Summary feature.

GraphRAG
Available in ≥ 3.6.6-funcrel
Enables GraphRAG, which builds a queryable semantic knowledge graph of your application to uncover relationships and insights. You must also choose an embedding provider and an embedding model before the GraphRAG pipeline can be run - see GraphRAG below.

GraphRAG

Available in ≥ 3.6.6-funcrel

GraphRAG builds a semantic knowledge graph from the functional documents and source code context available for an application, which you can then query with natural-language questions from an MCP client.

GraphRAG needs an embedding model in addition to the primary AI provider:

  • Primary AI provider - generates the completions used to extract business concepts and their relationships.
  • Embedding provider and model - creates the semantic representations that make the knowledge graph searchable.

The same provider can fill both roles, or you can use two different providers - for example Claude AI for completion and OpenAI for embeddings.

Choose how embeddings are generated

Configure the primary AI provider first, as described in Configuring a provider. Two options are then available:

Option Description
Use the primary AI provider Reuses the provider and credentials you have already saved. Available only where your primary provider supports embedding generation. You must still select an embedding model - the model used for completion is not used for embeddings.
Use a different AI provider Nominates a separate provider purely for GraphRAG embeddings. You must supply that provider’s own credentials in addition to the embedding model. Use this option when your primary provider does not support embedding generation.

When you reuse the primary AI provider, only the embedding model has to be selected:

When you use a different provider, select the provider, enter its credentials and then select the embedding model:

Supported embedding providers

The following providers are supported for GraphRAG embedding generation, whichever option you choose:

Embedding provider Required Default embedding model
OpenAIexternal link
  • API key
  • Access to api.openai.com (port 443)
text-embedding-3-small
Google Geminiexternal link
  • API key
gemini-embedding-001
Ollama AIexternal link
  • Endpoint URL: usually this will take the form http://<local_server>:11434
nomic-embed-text:v1.5

Select the embedding model

For your chosen provider, either select a model from the dropdown list, or choose Other and enter a custom model name:

Save the configuration

When all the required details have been provided, click Save Configuration:

Ensure your source code is accessible

The AI-driven features are all based on the source code of objects in your application, therefore, CAST Imaging must be able to display source code for these feature to function correctly. The only exception to this is the Summarize with AI feature specifically on the Application scope.

  • For applications that have been fully analyzed with CAST Imaging, source code will be available by default in the right panel. You do not need to do anything else.
  • For applications whose results have been imported into CAST Imaging (i.e. the application has not been fully analyzed), you will need to ensure that a datasource is configured. See Managing data source configuration