What are custom integrations?
Galileo’s custom integrations provide a flexible way of setting up LLMs that aren’t supported through other existing integrations. For example, when there are non-standard proxies, proprietary authentications, or proprietary inference protocols. This video demonstrates how to add a custom integration to Galileo:Configuring custom integrations in the Galileo console
Navigate to Integrations
Navigate to Settings > Integrations in the Galileo console.
Configure Integration
Paste a valid JSON and Save changes.
This JSON example uses PortKey and Mistral with API key authentication.
See more JSON examples
This JSON example uses PortKey and Mistral with API key authentication.
See more JSON examples

JSON examples
API key authentication integration
For providers that use API key authentication (for example, Together AI or Portkey):- Refer to your AI provider documentation for more info about the expected format for the
api_key_headerandapi_key_value. - Many AI providers require an
Authorizationheader with aBearerprefix in the API key value. However, some API providers don’t have these requirements.
OAuth2 integration
For providers that require dynamically-generated bearer tokens:Your
oauth2_token_url must support the OAuth2 Client Credentials Grant (RFC 6749 §4.4). Galileo exchanges the provided client_id and client_secret for an access token, which is then used as a Bearer token for LLM inference requests.No authentication integration
For internal endpoints or providers that don’t require authentication:The schema used in above examples comes from the Custom Integrations API. Refer to the API reference for the full list of available fields and options.
Troubleshooting ideas
- Make sure you have valid authentication credentials (e.g. an API key).
- Make sure the model name is exactly as specified through the provider.
- Make sure that requests are being sent to the provider’s endpoint.
curl command to verify that an API key and model for Portkey has been configured correctly.
Advanced usage: custom LLM handlers
The JSON examples work when your LLM provider exposes a standard OpenAI-compatible/chat/completions endpoint. However, some providers use proprietary request formats, non-standard response structures, or custom authentication flows that can’t be handled by configuration alone.
For these cases, you can write a custom LLM handler — a Python class that gives you full control over how Galileo sends requests to your model and interprets the responses.
When to use a custom handler
- Your provider’s API doesn’t follow the OpenAI
/chat/completionsformat - You need to transform requests or responses (e.g., different payload structure, custom headers)
- Your authentication flow goes beyond OAuth2 or API keys (e.g., signed requests, mTLS)
- You need custom retry logic or error handling
Writing a handler
Create a Python file with a class that extendslitellm.CustomLLM. Your class must implement the acompletion method, which receives the standard LiteLLM inputs and must return a ModelResponse:
Configuring the handler in your integration payload
Reference your handler using thecustom_llm_config field:
Python file containing the CustomLLM class (e.g.,
"proprietary_handler.py").Class name (must be a
litellm.CustomLLM subclass).Keyword arguments passed to the handler’s constructor.
Deploying handler files
Handler files must be placed on the Galileorunners container filesystem.
Set to
true to enable custom LLM support.Directory where handler files are located.
.py files directly in the configured directory (nested paths are not supported):
- Volume mount — Mount a volume containing your handler files at
/opt/custom_llms - Custom image — Build a custom runner image with handler files copied in
- Custom directory — Set
GALILEO_CUSTOM_LLMS_DIRECTORYto a different path
Security notes
- Tokens are encrypted before storage
- OAuth2 client credentials should be kept confidential and rotated regularly
- Custom LLM handler files should be reviewed for security before deployment


