Skip to main content
POST
Switch Conversation Llm

Authorizations

X-Session-API-Key
string
header
required

Path Parameters

conversation_id
string<uuid>
required

Body

application/json
llm
LLM · object
required

Language model interface for OpenHands agents.

The LLM class provides a unified interface for interacting with various language models through the litellm library. It handles model configuration, API authentication, retry logic, and tool calling capabilities.

Attributes: model: Model name (e.g., "gpt-5.6"). api_key: API key for authentication. base_url: Custom API base URL. num_retries: Number of retry attempts for failed requests. timeout: Request timeout in seconds.

Example: ```python from openhands.sdk import LLM from pydantic import SecretStr

Response

Successful Response

success
boolean
default:true