OPENCODE MODEL SELECTION

Choose an OpenCode model for the code you change.

The best models for OpenCode earn their place on your task set. Compare small edits, debugging and larger refactors separately, then choose the lowest-cost model that meets your standard.

Selected model rates from 0.3× official API pricing

Match the model to the job.

Use the task type to decide what a model must handle before comparing its rate.

TaskPrioritizeAcceptance check
Small, well-scoped editsAccurate instructions and low task costThe intended change passes its test
DebuggingUseful tool calls and evidence-based diagnosisThe failing case is reproduced and fixed
Large refactorsContext handling and consistent editsThe change preserves behavior across files

Use specifications to narrow the list, then test the client.

For a small edit, start with the smallest context that includes the relevant function and its test. For a repository-wide refactor, check the publisher context and output limits, then try a multi-file edit using your chosen OpenCode adapter. A large context window alone does not establish reliable editing or tool use.

Keep with your resultRecord
Client and configurationClient version, exact model ID and API adapter
AcceptancePatch review and the relevant test result
CostAll requests, retries and billed token categories
ReproducibilityTest date, instructions and sanitized failure details

Build a shortlist from available models.

Filter by publisher and image input, then compare context limits and the recommended agent API. Open each candidate for its current Codimixa rates.

Input types and context limits describe the publisher’s model. The agent API column gives the recommended request format. Open a model for its configuration and source links.

Model / exact API IDPublisher inputsPublisher contextAgent API
claude-fable-5Text, image1M tokensMessages
claude-fable-5.1Text, image1M tokensMessages
claude-haiku-5.5Text, image1M tokensMessages
claude-opus-5—View model settingsAPI quickstart
claude-opus-5.5Text, image1M tokensMessages
claude-sonnet-5—View model settingsAPI quickstart
claude-sonnet-5.5Text, image1M tokensMessages
deepseek-4v-pro-call—View model settingsAPI quickstart
deepseek-search—View model settingsAPI quickstart
deepseek-v4-proText1M tokensChat Completions
deepseek-v4.1-flashText, image1M tokensChat Completions
deepseek-v4.1-flash-call—View model settingsAPI quickstart
gemini-3.8-flashText, image, audio, video, PDF1,048,576 input tokensChat Completions
gemini-4-argonText, image, audio, video, PDF1,048,576 tokens (input + output)Chat Completions
glm-5.2—View model settingsAPI quickstart
glm-5.3—View model settingsAPI quickstart
glm-5.3-flash—View model settingsAPI quickstart
gpt-5.6-lunaText, image1,050,000 tokensResponses
gpt-5.6-solText, image1,050,000 tokensResponses
gpt-5.6-terraText, image1,050,000 tokensResponses
gpt-6-astraText, image1,050,000 tokensResponses
gpt-6-lunaText, image1,050,000 tokensResponses
gpt-6-solText, image1,050,000 tokensResponses
gpt-6.1-solText, image1,050,000 tokensResponses
gpt-6.1-terra—View model settingsAPI quickstart
gpt-image-2-codex—View model settingsAPI quickstart
jev-1.13.0—View model settingsAPI quickstart
jev-1.14.0—View model settingsAPI quickstart
jev-latest—View model settingsAPI quickstart
jev-preview—View model settingsAPI quickstart
kimi-k3—View model settingsAPI quickstart
kimi-k3.1-pro—View model settingsAPI quickstart
minimax-m3.1-flash—View model settingsAPI quickstart
qwen3.7-max—View model settingsAPI quickstart
qwen3.7-plus—View model settingsAPI quickstart
qwen3.8-2.4t-a95b—View model settingsAPI quickstart
qwen3.8-27b—View model settingsAPI quickstart
qwen3.8-flash—View model settingsAPI quickstart
qwen3.8-max—View model settingsAPI quickstart
qwen3.8-max-0902—View model settingsAPI quickstart
qwen3.8-omni-flash—View model settingsAPI quickstart

Codimixa rates checked: 2026-10-31T15:06:07.868Z. Publisher references checked: October 20, 2026.

Use three tasks with explicit pass conditions.

Start from the same repository revision for each candidate. Set a spend limit before running the task and keep every attempt in the cost total. The table is a test plan you can apply to your repository.

TaskFixed inputPass condition
Small editOne function, its test and a specific behavior changeThe new case and existing relevant tests pass.
Bug fixA reproducible failing test and the relevant filesThe original failure is fixed without weakening the test.
Multi-file changeA defined interface change and its callersAll intended callers are updated and the relevant suite passes.

Set a default after the comparison.

Once a model fits your everyday work, use its exact ID as your OpenCode default. Keep a separate choice for tasks with different requirements, and compare again when your workflow changes.

A FEW DETAILS

Before you continue

Should I always use the most capable model?

Use the model that meets the task’s acceptance criteria at an acceptable total cost. A complex refactor and a small formatting fix can justify different choices.

Can a model generate code but still fail in OpenCode?

An agent also depends on tool behavior, the chosen API format and context handling. Include a tool-using task in your evaluation.

Reference documentation

OpenCode — Models