Skip to main content
TokenCost logoTokenCost

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

#1
DeepSeek V4.1 Flash
DeepSeek
Best for OpenHandsTerminal-Bench only · 90.6
In: $0.15/1M
Out: $0.6/1M
Ctx: 1.0M

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.

#2
Claude Opus 5
Anthropic
Highest benchmark scoreBoth suites · 93.0
In: $5/1M
Out: $25/1M
Ctx: 1.0M

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.

#3
Claude Sonnet 5
Anthropic
Both suites · 83.8Non-default tier
In: $2/1M
Out: $10/1M
Ctx: 1.0M

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.

#4
GPT-5.6 Sol
OpenAI
Longest contextTerminal-Bench only · 86.1
In: $4/1M
Out: $20/1M
Ctx: 1.1M

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.

#5
Gemini 3.6 Flash
Google
Terminal-Bench only · 77.5
In: $0.75/1M
Out: $3.75/1M
Ctx: 1.0M

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.

#6
MiniMax M3
MiniMax
Terminal-Bench only · 65.2
In: $0.3/1M
Out: $1.2/1M
Ctx: 1.0M

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.

#7
Kimi K2.6
Moonshot
Terminal-Bench only · 65.9
In: $0.95/1M
Out: $4/1M
Ctx: 262K

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.

#8
GLM-5.1
Zhipu
Terminal-Bench only · 61.8Non-default tier
In: $1.4/1M
Out: $4.4/1M
Ctx: 200K

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.

Issue resolution first
OpenHands works issue by issue and was built around SWE-bench, so SWE-bench Verified carries 0.7 of the quality score and Terminal-Bench 2.1 0.3.
OpenHands' own evidence
The roster starts from the models OpenHands recommends on its Index and swaps in successors only where our catalogue shows the same or lower price and a higher score. Each swap is named in the notes.
Moderate price pressure
Three points of pass rate per halving of blended price. A failed run that has to be repeated costs more than the token difference on most issues, which is the trade OpenHands' docs describe.
Room for long issue threads
Models under 200K context are excluded. OpenHands' known-issues note says to increase the context window when results degrade, so we set the floor high to start with.

Frequently Asked Questions

What is the best model for OpenHands?
For the best results, Claude Opus 5, the successor to the Claude Opus 4.8 that tops OpenHands' own recommendations, at the same price. For everyday issues at lower cost, Claude Sonnet 5 or Gemini 3.6 Flash. Our price-weighted ranking puts DeepSeek V4.1 Flash first, but its leading score is self-reported and OpenHands has not tested it, so try it on routine work before trusting it with hard issues.
What is the best local model for OpenHands?
OpenHands' docs say to start with Qwen3.6-35B-A3B for local and self-hosted use, served through LM Studio, Ollama, SGLang or vLLM. They also warn that open-weight and local models vary widely in tool-use reliability: if you see long waits, poor answers or malformed JSON errors, try a stronger model, raise the context window, or switch to a cloud model for that task.
Is OpenHands free?
The OpenHands software is open source. The model is what costs money, unless you run one locally. OpenHands' docs warn that it issues many prompts to the model you configure and tell you to set spending limits and watch usage. OpenHands Cloud and Enterprise are separate paid offerings and are not priced on this page.
Can I use OpenRouter with OpenHands?
Yes. OpenHands has an OpenRouter guide, and its own suggested model strings for open-weight models use the openrouter/ prefix, for example openrouter/z-ai/glm-5.1, openrouter/minimax/minimax-m3 and openrouter/moonshotai/kimi-k2.6. If a model string is rejected, its docs say to check the provider console and the LiteLLM provider list for the exact ID.
Why does this page differ from OpenHands' own recommendations?
Three entries are newer versions of the models OpenHands lists. Claude Opus 5 replaces Opus 4.8 at the same price with a higher score, GPT-5.6 Sol replaces GPT-5.5 at a lower price with a higher score, and Gemini 3.6 Flash replaces Gemini 3.5 Flash, which Google has deprecated on its API. We also rank on price as well as quality, which OpenHands' table does not. Its Index numbers are quoted on this page as OpenHands published them.
How do I cut OpenHands costs without a worse model?
OpenHands' docs suggest lower-cost profiles for routine edits and switching back to a stronger model for planning, debugging and review. Prompt caching helps too: OpenHands re-sends a lot of the same context on each step, so a model with a cheap cached-input rate costs much less in practice than its headline input price suggests.

The same models, weighted for another tool

Each page states its own weighting, so the order changes with the workload.