> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lithosai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use LithosAI with OpenHands

> Connect OpenHands directly to LithosAI through its OpenAI-compatible LLM settings.

OpenHands connects to LithosAI through its OpenAI-compatible LLM client. You do not need to
run a separate protocol adapter.

## Before you begin

Install and start OpenHands, create a key on the
[API Keys](https://console.lithosai.cloud/keys) page, and confirm the model ID you want to use
on the [Models](https://console.lithosai.cloud/models) page.

<Steps>
  <Step title="Open the LLM settings">
    Open the OpenHands web interface. In the initial setup dialog, select
    **See advanced settings**. If setup is already complete, open **Settings**, choose
    **LLM**, and enable **Advanced**.
  </Step>

  <Step title="Configure LithosAI">
    Enter the following values:

    | Field        | Value                           |
    | ------------ | ------------------------------- |
    | Custom Model | `openai/moonshotai/Kimi-K3`     |
    | Base URL     | `https://api.lithosai.cloud/v1` |
    | API Key      | Your LithosAI API key           |

    The `openai/` prefix selects OpenHands' OpenAI-compatible client. The remainder must match
    the model ID shown in the LithosAI console.

    <Tip>
      OpenHands needs a large context window for its system prompt and tools. Pick a model with
      enough context for your repository and task.
    </Tip>
  </Step>

  <Step title="Save and start a session">
    Select **Save Settings**, create a workspace, and start a new conversation.
  </Step>
</Steps>

## Verify the connection

Open a workspace that contains a `README.md`, then ask OpenHands:

```text theme={null}
Read README.md and reply with only its first Markdown heading.
```

OpenHands should read the workspace file and return its heading. This verifies both the model
response and a basic sandbox tool call.

## Troubleshooting

| Symptom                                | Cause                                                                                    |
| -------------------------------------- | ---------------------------------------------------------------------------------------- |
| OpenHands cannot find the model        | The Custom Model value is missing `openai/`, or the remaining model ID is incorrect.     |
| OpenHands behaves like a plain chatbot | The selected model may not perform tool calls reliably. Try a stronger coding model.     |
| The agent loses context early          | The selected model's context window is too small for the OpenHands prompt and workspace. |

Issues common to every agent are listed under [Common issues](/coding-agents#common-issues).

## Resources

* [OpenHands OpenAI-compatible LLM setup](https://docs.openhands.dev/openhands/usage/llms/local-llms)
* [Install OpenHands](https://docs.openhands.dev/openhands/usage/installation)
* [LithosAI models](https://console.lithosai.cloud/models)
