Manage LLM Service Providers
An LLM service provider connects your organization to a model provider, such as OpenAI, Gemini, or Mistral. You register the provider and its credential once, and your agents call the models through the gateway instead of calling the model provider directly. For information on how LLM service providers work, see LLM Service Provider.
Registering a provider instead of giving each agent its own API key has the following benefits:
- The model provider's credential stays in one place. Agents never receive it. When you rotate the credential, every agent that uses the provider picks up the change without being redeployed.
- You can see who uses the models. Each agent calls the gateway with its own key, so usage can be attributed to the agent.
- You can apply guardrails to every call. Guardrails on the provider apply to all the agents that use it, without any change to the agents' code.
LLM service providers belong to the organization, so the agents in any project can use them.
Add an LLM service provider
-
At the organization level, in the left navigation, under Resources, click LLM service providers.
-
Click Add service provider.
-
Select the model provider, for example Gemini, Mistral, or OpenAI.
-
Under Runtime Configuration, enter the following:
Field Description Example Endpoint URL The URL of the model provider's API. https://api.openai.com/v1API key / Credential The credential that the gateway uses to call the model provider. Agents never see this value. -
To control how long the gateway waits for the model provider, expand Resilience and set the timeouts:
Field Description Example Request Timeout How long to wait for a response from the model provider. Increase it for models that take long to respond. 60sIdle Timeout How long an idle connection to the model provider is kept open. 300s -
To apply guardrails to every call through the provider, add them. For more information, see Add a guardrail.
-
Click Add provider.
Add a guardrail
A guardrail is a policy that the gateway applies to the calls through the provider, for example to limit the size of requests and responses, or to check them against a schema. A guardrail on the provider applies to every agent that uses the provider. You can add, change, or remove a guardrail without rebuilding or redeploying the agents.
-
Under Guardrails, click Add guardrail. The Add Guardrail panel opens.
-
Select a guardrail. To find a guardrail, enter its name in Search guardrails. The guardrails that are available include the following:
Guardrail Use it to Content Length Guardrail Reject requests or responses that are shorter or longer than the limits that you set. JSON Schema Guardrail Check that requests or responses match a JSON Schema. interceptor-service Send the request, the response, or both to your own HTTP service, which can change them or return a response directly. AWS Authentication Sign the requests to AWS-hosted model providers with AWS Signature Version 4 (SigV4). Azure LLM Cost Calculate the cost of Azure OpenAI and Azure AI Foundry calls from the token usage. -
Under Parameters, configure the guardrail. For example, for Content Length Guardrail, set the limits for the request, the response, or both.
-
Click Add.
The guardrail is listed under Guardrails. To remove it, click the delete icon.
To apply a guardrail to one agent only, add it to the agent's LLM configuration instead. For more information, see LLM Configurations.
Next steps
- To let an agent use the provider, add an LLM configuration to the agent. For more information, see LLM Configurations.
- To use a provider for LLM judge evaluators, select it when you create a monitor. For more information, see Create a Monitor.
- For a walkthrough of registering a provider, including its access control, security, rate limiting, and guardrail settings, see Register an LLM Service Provider.
- For how agents connect to a provider and use it in their code, see Configure LLM Providers for an Agent.
Was this page helpful?