Skip to main content

Overview

OpenHands can use AI Sonar through its LiteLLM/OpenAI-compatible model configuration, especially for CLI and headless workflows where you provide the model, API key, and base URL.
Type: Coding AgentPrimary Path: OpenAI-compatible model configurationSupport Confidence: Supported custom endpoint path

Environment

Model Settings

Use:
The openai/ prefix tells the LiteLLM-backed path to use an OpenAI-compatible provider configuration.

Headless Setup

If you are preparing local defaults for CLI or headless usage, run the OpenHands setup flow and enter:
When prompted for model details, use the AI Sonar model ID with the openai/ prefix and AI Sonar’s /v1 base URL.

Model Suggestions

Use claude-sonnet-5 or gpt-5.4 for coding-agent planning, gpt-5.4-mini for faster routine loops, and deepseek-v4-pro when you want a strong alternative reasoning model.