Skip to content

Connect to a model provider ​

Overview ​

Connect F5 AI Security Platform to a model to protect it with guardrails and test it with F5 AI Red Team. Add connections on the Connections page.

Choose a built-in provider when one matches your model. For other endpoints, define a custom connection in YAML. The platform tests each connection before it saves it. If the test fails, the platform doesn't save the connection.

This guide covers the user interface. To use the API or Python SDK, see Create a provider.

Before you begin ​

Make sure you have:

  • An AI Security workspace: For an on-premises deployment, use your workspace URL. For SaaS, use your assigned URL, such as us1.calypsoai.app or eu1.calypsoai.app.
  • An account: Your workspace login credentials.
  • Permissions: Your role needs Models permissions, such as Add connection. To add secrets to a custom connection, you also need Create secret. See Permissions, roles, and tokens.
  • Connection details: Get the model name and API key from your provider. Some providers also require an endpoint URL.
  • Network access: If your endpoint restricts source addresses, add the platform addresses to your allowlist. See SaaS outbound IP addresses.

Connect with a built-in provider ​

The platform maintains the request format for each built-in provider.

  1. Log in to your AI Security workspace.

  2. Go to Connections.

  3. On the Models tab, find your provider under Available provider connections.

  4. On the provider tile, select Add.

  5. In Display name, enter a name for the connection.

  6. In Model name, enter the name exactly as your provider spells it.

    The name is case-sensitive.

  7. In API key, enter the key from your provider.

  8. Complete the fields for your provider:

    • OpenAI Compatible: In URL, enter the full endpoint URL, such as https://llm.example.com/v1/chat/completions.
    • OpenAI, OpenAI Compatible, or Hugging Face: In Endpoint, select chat completions or responses. You can't change this choice later.
    • watsonx: Enter the Project ID and Region for your IBM watsonx project.
    • Azure: Enter the Resource name, Deployment ID, and API key for your Azure OpenAI deployment. To use a Microsoft Entra app, turn on Enable User Identity, then enter the Tenant ID, Client ID, and Client secret.
  9. Optional: Set a limit for F5 AI Red Team requests. See Limit AI Red Team requests.

  10. Select Test and connect.

    If the test passes, "Configuration Saved!" appears and the connection appears under Model connections. Otherwise, see Troubleshooting.

Connect with a custom connection ​

Use a custom connection when a built-in provider doesn't match your model. The configuration defines the HTTP request and how to read the response. For examples, see Custom connection use cases.

If your endpoint uses OpenAI Chat Completions, select the OpenAI Compatible tile instead. If you need a custom connection for an OpenAI-style endpoint, start with the openai-compatible-chat example.

Name the provider and model ​

  1. Log in to your AI Security workspace.

  2. Go to Connections.

  3. On the Models tab, select Add other providers.

  4. In Provider name, enter a provider name or select an existing one.

    The platform groups models under this name in Model connections. Use the same name for additional models from the same provider.

  5. In Model display name, enter a name of up to 100 characters.

  6. Select the Connection settings tab.

  7. Optional: In Example configuration, select an example close to your endpoint.

    For Amazon Bedrock, select bedrock-converse.

  8. Optional: In Compatible API, select the format your endpoint uses.

    The choices are OpenAI Chat Completions API, OpenAI Responses API, and Anthropic Messages API. Select a format only if the endpoint returns responses in exactly that format. Otherwise, leave the box empty. You can't change this choice later.

Write the request ​

  1. Select the YAML parameters tab.

  2. For each nonsecret value, enter its name in Name and its value in Value.

    For example, enter url and https://llm.example.com/v1/chat.

  3. To add another value, select Add parameter.

    For example, add model with the value example-model-1.

  4. In YAML template, enter your request in YAML.

    The top-level block must return statusCode, content, and error. For a sample request, see Call a JSON endpoint. For block types, fields, and expressions, see Custom connection YAML reference.

  5. If validation issues appear, select the Errors tab to review them.

Add authentication and secrets ​

Select an authentication type after you finish the YAML template. For API Key, AWS Sig V4, Basic, Bearer, JWT, and OAuth 2.0, the platform rewrites the YAML. For these types, the platform clears entered secrets when you select a type.

  1. Select the Connection settings tab.

  2. In Authentication type, select the method your endpoint uses.

    The list is unavailable until YAML template contains a type: request block. The table lists the values for each type. Values without a required marker appear in the last column. For YAML changes and secret names, see Authentication types.

    Authentication typeRequired valuesValues without a required marker
    API KeyValueNone
    AWS Sig V4Access Key, Secret Key, Service name, AWS RegionSession token
    BasicUsername, PasswordNone
    BearerTokenNone
    CustomNone markedKey, Value
    OCIOCI Key ID, OCI Private KeyOCI Passphrase
    JWTToken URL, Issuer (iss), Subject (sub), Audience (aud), Private KeyKey ID (kid), Algorithm, Scope
    OAuth 2.0Auth URL, Client ID, Client SecretScope, Audience

    OCI stands for Oracle Cloud Infrastructure.

  3. If you selected a type other than Custom, enter the values for that type.

  4. If you selected Custom, add each credential:

    1. In Key, enter the secret name, such as apiKey.
    2. In Value, enter the secret, such as your API key.
    3. To add another secret, select Add new secret.

    Refer to the secret in YAML template as {{ apiKey }}. The platform stores secret values encrypted.

  5. Optional: Set a limit for F5 AI Red Team requests. See Limit AI Red Team requests.

  6. Select Test and connect.

    If the test passes, "Configuration Saved!" appears and the model appears under Model connections. Otherwise, see Troubleshooting.

Test a connection ​

Select Test and connect to test a connection. If the test fails, the platform doesn't save the connection or your changes.

The test sends one request with the prompt Hello there, empty conversation memory, and your inputs and secrets. For OAuth 2.0 or JWT, the platform first gets an access token. The test passes when the statusCode output is 200.

  1. Select Test and connect.

  2. If the test fails, expand Error to read the details.

    The message "Error testing provider, please check error log" appears. The details include a provider response or a platform message.

  3. Fix the issue.

  4. Select Test and connect again.

To retest a connection, open the model's three-dot menu and select Manage model. Make your change, then select Test and connect.

Limit AI Red Team requests ​

Set a limit if your model provider restricts the rate of requests.

  1. On Configure and connect your model, expand Advanced configuration.

  2. Under AI Red team rate limiting, select Max concurrent requests or Max requests per second.

  3. Enter a number from 1 to 10,000.

    For example, enter 1 under Max concurrent requests to send attacks one at a time.

Manage a connection ​

Under Model connections, select Manage next to a provider to see its models. To change a connection, open the model's three-dot menu and select Manage model. The same menu contains Access controls and Delete. For each model, you can:

  • Turn on Default model to set the default model for your organization.
  • Turn on Allow access to make the model available.
  • Select Access controls to choose which projects can use the model.
  • Select Delete to remove the model. You can't undo the deletion.

Troubleshooting ​

"Error in yaml, please check error log" ​

Symptom: The test doesn't start.

Cause: YAML template contains invalid YAML. An unquoted expression at the start of a value can cause a parse error.

Fix: Quote the expression, for example url: '{{ url }}'. If the expression contains single quotes, use double quotes around the value.

"Referenced undefined variable" ​

Symptom: The error details name an undefined variable, such as apiKey.

Cause: The name doesn't match an input, a secret, or a provided variable. Names are case-sensitive. A change to the authentication type also clears secrets.

Fix: Check the spelling and add the missing input or secret. If you changed the authentication type, enter your secrets again.

"No statusCode output from provider" ​

Symptom: The test fails with this message.

Cause: The top-level configuration block doesn't return statusCode. A workflow returns only the names in its own outputs.

Fix: Add statusCode, content, and error to the top-level outputs. See Required outputs.

"Invalid URL domain" ​

Symptom: The test reports that the endpoint resolves to a blocked address.

Cause: The platform blocks loopback, link-local, multicast, and unspecified addresses. By default, it also blocks private IP addresses.

Fix: Use a public endpoint URL. For a self-hosted deployment, ask your administrator whether private endpoints are allowed.

"Request timed out" ​

Symptom: The test fails with a timeout message.

Cause: The model didn't respond within the request timeout. The default is 20 seconds.

Fix: Increase the timeout in the request block, for example to 300 seconds.

Redirect status code ​

Symptom: The test reports a 3xx status code, such as 301 or 307.

Cause: By default, the platform doesn't follow redirects.

Fix: Enter the final endpoint URL.

References ​

Updated at: