Getting started Community Training Tutorials Documentation APIs, AI & Tools
Create Model Proxies
You can configure a model proxy to route LLM traffic across different models and providers using model-based or semantic routing strategies. When you create a model proxy, you define the endpoint format, routing strategy, and at least one route that maps requests to a supported LLM provider and model. After deployment to Omni Gateway, you can edit the proxy configuration at any time.
| A large Omni Gateway supports up to 50 Model Proxies. |
Before You Begin
Before getting started, make sure you have:
-
An Anypoint Platform account
-
API Manager: API Creator permission
For more information, see Agent Fabric Permissions.
-
A deployed Omni Gateway version 1.11.4
-
Credentials to authenticate with your LLM providers: an API key, OAuth 2.0 client credentials (Microsoft Foundry), or an issuer and PEM private key for OAuth 2.0 JWT bearer (Google Gemini Enterprise Agent Platform).
-
A configured semantic routing service if you want to use semantic routing.
-
A configured semantic caching service if you want to enable semantic caching.
-
A connection to an external vault (AWS Secrets Manager, Microsoft Azure Key Vault, or HashiCorp Vault) configured under Platform > Providers if you want to authenticate a route with a secret from your vault. For more information, see Use Credentials Stored in External Vaults.
Create a Model Proxy
-
In the navigation pane, select Model Proxies.
-
Click Add Model Proxy
-
Configure the proxy parameters:
-
Proxy Name: Define a name for the Model Proxy.
-
Description: Provide a description of what this proxy does.
-
Base Path: Define a base path for the proxy endpoint (for example:
/billing-ai). -
Format: Select an endpoint format:
-
OpenAI: Select the OpenAI API format to send requests to all supported LLM providers (including Gemini and Anthropic). Supports multi-routing and fallback mechanisms. You can’t change this format later.
-
Anthropic: Select the Anthropic API format for native Anthropic Claude model requests. Doesn’t support multi-routing or fallback mechanisms. You can’t change this format later.
-
Gemini: Select the Gemini API format for native Google Gemini model requests. Doesn’t support multi-routing or fallback mechanisms. You can’t change this format later.
-
-
Environment: Select the environment for the Model Proxy.
-
Omni Gateway: Select an Omni Gateway to deploy the Model Proxy to.
-
Consumer Endpoint: Specify the URL where the Model Proxy will be accessible.
-
Port: Enter the port number for the Model Proxy (for example,
8081). -
Optionally, configure TLS Configuration to secure the proxy endpoint:
-
Secret Group: Select the secret group that contains your TLS context. If you don’t see your secret group, ensure that it is downloadable. For more information, see Add a TLS Context.
-
TLS Context: Select the TLS context to use. If you don’t see your TLS context, click Configure a new TLS Context to create one.
-
-
-
Click Continue.
-
Configure the routing strategy:
-
Select a routing strategy:
-
Model-based: Route requests based on the model specified in the request payload.
-
Semantic: Route requests based on semantic analysis of the prompt content. Requires a configured semantic routing service. For more information, see Configure Semantic Routing Services. Not supported for the Anthropic or Gemini endpoint formats.
-
-
-
Configure at least one route:
-
Provide a route name (for example,
Route A). -
Optionally, click Add headers to add routing headers that filter requests by region, SLA, or custom rules. For example,
Region: US -
Configure the target:
-
Provider: Select your LLM provider from these options:
-
OpenAI
-
Gemini
-
Azure OpenAI
-
Microsoft Foundry OpenAI
-
Google Gemini Enterprise Agent Platform Gemini
-
Google Gemini Enterprise Agent Platform OpenAI
-
Bedrock OpenAI
-
Bedrock Anthropic
-
NVIDIA Nemotron
-
Anthropic
-
xAI
-
Mistral
-
Salesforce LLM
-
Any custom provider published to Anypoint Exchange. For more information, see Publishing Custom LLM Providers to Anypoint Exchange.
-
-
Request model override: Select a target model to override the model version specified in the payload. Selecting Use model from request sends the request to the model specified in the request. For the Anthropic and Bedrock Anthropic providers, to use a model that isn’t in the list, select Use a custom model and enter the provider’s model ID, for example,
claude-opus-4-8. A target model is required for semantic routing. -
Destination URL: Specify the URL for your provider endpoint. Ensure the URL is correct and edit if necessary.
For Microsoft Foundry and Google Gemini Enterprise Agent Platform providers, replace the placeholders in the default URL with your values:
-
Microsoft Foundry: Replace
{resource}with your Foundry resource name, for example,https://{resource}.services.ai.azure.com/openai/v1/. -
Google Gemini Enterprise Agent Platform: Replace
{region}and{project}with your Google Cloud region and project ID, for example,https://{region}-aiplatform.googleapis.com/v1/projects/{project}/locations/{region}/endpoints/openapi/chat/completions.
-
-
-
Optionally, under TLS Configuration, click Add TLS Context to secure the connection to the provider endpoint with a TLS context.
-
Configure authentication:
-
For Bedrock OpenAI and Bedrock Anthropic providers, configure your AWS credentials:
-
Access Key ID: Enter your AWS access key ID. Select Static, Dynamic, or From vault, the same options as for an API key.
-
Secret Access Key: Enter your AWS secret access key.
-
Session Token (Optional): Enter an AWS session token. Required only for temporary AWS credentials. Leave blank for long-term credentials.
-
AWS Region: Select the AWS region of your Bedrock endpoint, for example, US East (N. Virginia).
-
-
For all other providers, select an Authentication type. The available types depend on the provider:
-
API key: Choose one of the following:
-
Static: Use your provider API key. Enter a static API key for the provider endpoint.
-
Dynamic: Retrieve your key dynamically from the request. Define a DataWeave script to extract the API key from the incoming request.
-
From vault: Use a secret stored in an external vault. Select a secret group, then select a secret from that group. For more information, see Use Credentials Stored in External Vaults.
-
-
OAuth 2.0 client credentials: Available for Microsoft Foundry OpenAI and Salesforce LLM providers. Model Proxy obtains an access token from the token URL by using a client ID and client secret. Configure these fields:
-
Client ID: Enter your OAuth client ID.
-
Client Secret: Enter your OAuth client secret. Select Static to enter the secret directly or From vault to use a secret stored in an external vault.
-
Token URL: Replace the placeholder in the default token URL with your value. For Microsoft Foundry, replace
{tenant}inhttps://login.microsoftonline.com/{tenant}/oauth2/v2.0/tokenwith your Microsoft Entra tenant ID. For Salesforce LLM, replace{org}inhttps://{org}.my.salesforce.com/services/oauth2/tokenwith your Salesforce org’s My Domain name. -
Scopes: (Optional) Enter the scopes to request. Separate multiple scopes with spaces. For Microsoft Foundry, the default is
https://cognitiveservices.azure.com/.default.
-
-
OAuth 2.0 JWT bearer: Available for Google Gemini Enterprise Agent Platform providers. Model Proxy signs a JWT with your private key and exchanges it for an access token. Configure these fields:
-
Issuer: Enter the value of the JWT
issclaim, for example, your Google Cloud service account email address. -
Signing key: Paste the PEM private key used to sign the JWT. Select Static to paste the key directly or From vault to use a secret stored in an external vault.
-
-
-
-
-
Click Add Route to add additional routes. Complete the previous steps to configure each new route
-
If you added multiple routes, configure the settings for your routing strategy:
-
Optionally, expand Advanced Options and enable Enable semantic caching to cache and reuse LLM responses based on semantic similarity. Select a configured semantic caching service from the list. For more information, see Configure Semantic Caching Services.
-
Click Add Model Proxy.
Configure Model-Based Routing
To configure model-based routing:
-
Configure multiple routes. Click Add Route to create new routes.
-
Select Model-based for Routing strategy.
-
Under Fallback, configure the route to send the request to if the provider or model is incorrectly specified:
-
Route: Select the route to fall back to, or select No fallback.
-
Model: Select the model for the fallback route to use.
If no fallback route is configured and a route fails, an error response is returned.
-
-
Return to Create a Model Proxy to finish configuring your Model Proxy.
Configure Semantic Routing
To configure semantic routing:
-
Make sure you have a configured semantic routing service.
-
Configure multiple routes and select a target model for each route. Click Add Route to create new routes.
-
Select Semantic for Routing strategy.
-
Select your semantic routing service.
-
For each route, select one or more Topics. Requests that match a route’s topics are sent to that route.
-
Advanced scale semantic service: Select prompt topics from your predefined prompt topics.
-
Basic scale semantic service: Select existing prompt topics or create new ones:
-
Click Create prompt topic.
-
Define a Prompt topic name.
-
Define Prompt utterances or click Upload utterances to upload a plain text file containing your prompt utterances.
-
Click Create.
-
Create multiple prompt topics for each route as needed.
-
-
-
Under Fallback, configure the route to send the request to if it doesn’t match a semantic route:
-
When semantic match fails or accuracy is less than: Set the accuracy threshold by using the slider or by entering a value, for example,
0.5. When the semantic match fails or its accuracy is less than this threshold, traffic is sent to the fallback route. -
Route: Select the route to fall back to, or select No fallback. The fallback route displays a Fallback label.
-
Model: Select the model for the fallback route to use.
-
-
To block users from asking about specific topics, expand Advanced Options and, in Semantic prompt guard, select the prompt topics to block. Requests that match these topics are blocked.
-
Return to Create a Model Proxy to finish configuring your Model Proxy.



