> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-docs-litellm-proxy-screenshot.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LiteLLM Proxy

> OpenHands supports using the [LiteLLM proxy](https://docs.litellm.ai/docs/proxy/quick_start) to access various LLM providers.

## Configuration

To use LiteLLM proxy with OpenHands, you need to:

1. Set up a LiteLLM proxy server (see [LiteLLM documentation](https://docs.litellm.ai/docs/proxy/quick_start))
2. When running OpenHands, you'll need to set the following in the OpenHands UI through the Settings under the `LLM` tab:

* Enable `Advanced` options
* `Custom Model` to the prefix `litellm_proxy/` + the model you will be using (e.g. `litellm_proxy/anthropic.claude-3-5-sonnet-20241022-v2:0`)
* `Base URL` to your LiteLLM proxy URL (e.g. `https://your-litellm-proxy.com`)
* `API Key` to your LiteLLM proxy API key

Here's an example profile configured for a LiteLLM proxy model:

<img src="https://mintcdn.com/allhandsai-docs-litellm-proxy-screenshot/7TEhtn4vDkx4rThB/openhands/usage/llms/screenshots/litellm-proxy-profile-configuration.png?fit=max&auto=format&n=7TEhtn4vDkx4rThB&q=85&s=b6a83a5ab65b4e59fe5a2b5eea0edf91" alt="LiteLLM proxy LLM profile configuration in OpenHands" width="2270" height="1352" data-path="openhands/usage/llms/screenshots/litellm-proxy-profile-configuration.png" />

## Supported Models

The supported models depend on your LiteLLM proxy configuration. OpenHands supports any model that your LiteLLM proxy
is configured to handle.

For the model names and providers LiteLLM can route, see the [LiteLLM model catalog](https://models.litellm.ai/).
Your OpenHands configuration should use the model name exposed by your LiteLLM proxy.

## Helpful LiteLLM Docs

For common next steps after setup, these LiteLLM docs are especially useful:

* [View supported providers and model names](https://models.litellm.ai/)
* [View usage and spend metrics](https://docs.litellm.ai/docs/proxy/metrics)
* [View proxy request logs in the LiteLLM UI](https://docs.litellm.ai/docs/proxy/ui_logs)
* [Debug proxy issues](https://docs.litellm.ai/docs/proxy/debugging)
