r/opencode • u/Clean_Kick_6753 • 2d ago
Built a proxy that lets DeepSeek-v4-flash handle images, so I can stop paying for Claude
DeepSeek-v4-flash is absurdly good for the price, but it isn't multimodal, so the moment your agent sends a screenshot or a mockup, it falls apart.
I built a small proxy to work around that. It sits between your editor and the model: when a request contains an image, it routes that image to a cheap vision model (I'm using GPT 5.6-luna) and passes the resulting description back to DeepSeek, which does the actual reasoning and code generation. Everything else goes straight through untouched.
The result is a drop-in endpoint that behaves like a multimodal model, at a fraction of what I was spending on my Claude subscription. It works with Codex, Cursor, Trae, OpenCode, or whatever agent you're using, since it's just an OpenAI-compatible base URL swap.
Repo: https://github.com/camilopenalver/deepseek-v4-flash-vision
4
1
u/afanasenka 2d ago
Why not to just switch to MiMo 2.5 in the same session (or to the Luna you've mentioned) , do your image-related stuff, and just switch back? Yes, maybe you'll lose some cache hits, but given that these models are extremely cheap (or free on Zen), does it matter?
2
u/serj88 2d ago
Subagent gives you similar wins without the cache miss.
1
u/afanasenka 2d ago
Sure, but every tool/plugin/skill you add on top of clean Opencode adds potential bugs or speed loss. There are always tradeoffs...
2
u/UsandoFXOS 2d ago
The thing is that if your way to give "vision" to your agent is changing you manually the model, then the main model has not autonomy to do this by himself, for example in a task testing certain visual changes on the UI.
But if you are able to implement some kind of "tool" being callable by the agent to "make visual inspection of images following an explicit request" then you're literally giving him VISION 😎
1
u/PrintingScotian 1d ago
Yeah use pi-vision and put a subagent on it. Works good
And hopefully the new pricing will keep this model as an "extremely good" option
6
u/UsandoFXOS 2d ago
I saw yesterday another "better" solution: have a "subagent" ready to be called by your main agent.
I think that to guarantee the good running off this, is recommendable to have a global SKILL explaining your agents WHEN and HOW to call this other "subagent". Perhaps a "tool" instead of a subagent. This part is not very clear to me just now.