Best LLM for OpenHands
OpenHands works with any model LiteLLM can reach, and its own docs say it needs a powerful one. Here is which, at what price.
Prices on this page last verified against each provider’s own pricing page
OpenHands is the open-source coding agent that started life as OpenDevin. It works through a task inside a sandbox: it reads the repository, edits files, and runs commands and tests. Its newer Agent Canvas front end can also drive Claude Code, Codex, Gemini CLI, Pi or OpenCode, but the native OpenHands agent is bring-your-own-model. It connects to any LLM LiteLLM supports, through a provider key, OpenRouter, a LiteLLM proxy or a local server such as Ollama, LM Studio, vLLM or SGLang.
OpenHands publishes its own recommendations, scored on the OpenHands Index. As read on October 28, 2026 the top cloud picks were Claude Opus 4.8 (index average 71.9), GPT-5.5 (65.9) and Gemini 3.5 Flash (62.6), and the top open-weight picks GLM-5.1 (58.2), MiniMax M3 (57.2) and Kimi K2.6 (57.1). For local use it says to start with Qwen3.6-35B-A3B. This page starts from that list and updates three entries where the catalogue has moved: Claude Opus 5 replaced Opus 4.8 at the same price with a higher SWE-bench score, GPT-5.6 Sol scores higher than GPT-5.5 and costs less per token, and Google has deprecated Gemini 3.5 Flash on its API and routes its traffic to Gemini 3.6 Flash.
OpenHands grew up on SWE-bench and works issue by issue, so SWE-bench Verified carries 0.7 of the quality score and Terminal-Bench 2.1 0.3. Its docs tell you to use the strongest model you can afford for long or high-stakes tasks and to set spending limits because it sends many prompts, so price presses moderately: three points of pass rate per halving of blended price. Models under 200K context are left out.
Top Models for OpenHands — October 2026
First on our weighting because it is far cheaper than anything else here and DeepSeek reports 90.6 on Terminal-Bench 2.1. That score is self-reported, it has no SWE-bench Verified figure, and OpenHands has not published an Index result for it, so treat the rank as a price argument, not a quality one. Worth trying on routine issues first. Weekday peak hours bill double the off-peak figure shown.
The quality pick. OpenHands' own table names Claude Opus 4.8 as its best Claude model; Opus 5 is the same price with a higher SWE-bench Verified score (96.0 against 88.6, both Anthropic-reported), so there is no reason to stay on 4.8 unless your provider has not added 5. Use it for planning, debugging and review, which is where OpenHands' docs say to spend on the strongest model.
Not in OpenHands' own table, but the middle ground the table leaves out: 85.2 on SWE-bench Verified with a full 1M context, at well under Opus pricing. A sensible default profile for everyday issues, with Opus 5 kept for the hard ones.
OpenHands' table names GPT-5.5 as its GPT pick, with an Index average of 65.9. GPT-5.6 Sol is cheaper per token and scores 86.1 on Terminal-Bench 2.1 against 80.5 for GPT-5.5 in Artificial Analysis's runs, so it is the OpenAI model we list. Input past 272K reprices the whole request, which long issue threads can reach.
OpenHands lists Gemini 3.5 Flash as its best Gemini pick. Google deprecated that model on its API on October 8, 2026 and now routes requests to Gemini 3.6 Flash, which costs less and scores 77.5 on Terminal-Bench 2.1 in Artificial Analysis's run. Vertex AI retires 3.6 Flash on November 19, 2026, and Google says its current rate reverts to the launch price on January 1, 2027.
One of OpenHands' recommended open-weight models, with an Index average of 57.2, and the cheapest of them per token now that MiniMax calls its half price permanent. 1M context, open weights. Rates double above 512K input.
Recommended by OpenHands at an Index average of 57.1, open weights, and quick for its size. Its 262K context clears this page's floor but is the smallest here, so long runs will need their context trimmed sooner.
OpenHands' highest-scoring open-weight model at 58.2 on its Index, and the model string its docs suggest is openrouter/z-ai/glm-5.1. Z.ai now sells GLM-5.2 at the same price with a 1M context instead of 200K, but OpenHands has not published an Index score for it, so we list the one it tested.
How We Ranked These Models
Order is computed, not hand-picked. Each model is scored on the published pass-rate suites it has (SWE-bench Verified 0.7, Terminal-Bench 2.1 0.3), renormalised over the suites present, then charged 3 quality points for every doubling of its blended price (3:1 input-to-output tokens). Models with no published score are never given one: they are listed after every scored model, ordered by price, and labelled as unscored. OpenHands grew up on SWE-bench and its agent works issue by issue in a sandbox, so SWE-bench Verified leads at 0.7 against 0.3 for Terminal-Bench 2.1. Its own docs tell you to use the strongest model you can afford for long or high-stakes tasks, so price presses only moderately: 3 points of pass rate per doubling. The 200K floor keeps out models that run short on long issue threads. See the full ranking method.
Frequently Asked Questions
What is the best model for OpenHands?
What is the best local model for OpenHands?
Is OpenHands free?
Can I use OpenRouter with OpenHands?
Why does this page differ from OpenHands' own recommendations?
How do I cut OpenHands costs without a worse model?
The same models, weighted for another tool
Each page states its own weighting, so the order changes with the workload.