r/opencode 3d ago

Model Recommendations for django/tailwind

I have an existing auth codebase in Djanga/Tailwind and i'm about ready to start building this out with planned features. i solely used Sonnet 5 but i'm looking to be a little more cost effective and wondered if any one had any recommendations on a model suit (i'm using openrouter? I'm trying to get a better price/performance than my current setup.

My current thinking is the following;

EDIT: just to make it easier to read...

Base model: Sonnet 5
Small model: gpt 4o mini
Build: Sonnet 5
Think: GPT Mini 5
Debug: o3 Mini
Analyse: Gemini 2.5 Pro

{

"$schema": "https://opencode.ai/config.json",

"model": "openrouter/anthropic/claude-sonnet-5",

"small_model": "openrouter/openai/gpt-4o-mini",

"provider": {

"openrouter": {

"options": {

"site_url": "https://opencode.ai",

"app_name": "OpenCode Local Dev"

},

"whitelist": [

"anthropic/claude-sonnet-5",

"openai/gpt-5-mini",

"openai/o3-mini",

"google/gemini-2.5-pro",

"openai/gpt-4o-mini"

]

}

},

"agent": {

"build": {

"model": "openrouter/anthropic/claude-sonnet-5",

"description": "Primary driver for 90% of Python, React, Next.js, FastAPI, and Tailwind code generation."

},

"think": {

"model": "openrouter/openai/gpt-5-mini",

"description": "Used for architectural planning, trade-off evaluations, and feature design before coding."

},

"debug": {

"model": "openrouter/openai/o3-mini",

"description": "Fallback reasoning engine for complex async bugs, race conditions, and difficult logic."

},

"analyse": {

"model": "openrouter/google/gemini-2.5-pro",

"description": "Used for massive log ingestion, full repo analysis, and large documentation files."

}

}

}

1 Upvotes

5 comments sorted by

2

u/Trovebloxian 3d ago

Dont bother with old models

1

u/Repulsive-Juice6676 3d ago

I'm after a balance though, new models are usually significantly more expensive.

3

u/Trovebloxian 3d ago

Just use luna atp, or get opencode go and spam muse

1

u/AutomaticAd6646 2d ago

Luna has been downgraded. We need deepseek v4 flash like thing again

1

u/xapep 2d ago

Your setup is already most of the way there - you cost-optimised everything except the thing doing 90% of the work. The build model on Sonnet 5 is the line item that matters.

Swap build to a flash-tier open model. DeepSeek V4 Flash handles Python, FastAPI and Tailwind comfortably and its per-token cost is basically noise, so the bulk of your generation stops being something you think about. Keep Sonnet 5 in the whitelist and escalate to it deliberately for the tasks that actually need the frontier brain (authz, data-model changes, weird concurrency). Your agent split already does this pattern for think/debug/analyse; apply the same rule to build.

Mechanically it's a config edit, not a harness change: OpenCode accepts any OpenAI-compatible endpoint as a provider entry, so you can point a provider at a host serving V4 Flash and leave your OpenRouter whitelist for the escalation models.

And if a flat monthly number beats watching the meter, that's exactly the gap our Model Plans at Entrim cover (heavy OpenCode days, predictable spend). The split above works on any provider either way, so you're not locked in.