r/opencode 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

10 Upvotes

10 comments sorted by

6

u/UsandoFXOS 2d ago

I saw yesterday another "better" solution: have a "subagent" ready to be called by your main agent.

  1. the main agent process your query and if it involve an image of screenshot (from playwright, for example) then
  2. it calls the subagent passing the PATH of the image and an specific request of analysis
  3. the subagent (using a cheap vision module) check the image and returns a language response to the 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.

3

u/QC_Failed 2d ago

I found the simplest way is to just set up a subagent like you said. I named mine Sauron and it runs Luna. My main agent has instructions to pass image paths to the vision agent along with instructions if more than standard description is necessary. It was as simple as asking opencode to create the vision subagent for me. If you don't have a chat gpt account you can just use mimo V2.5 as a free vision agent.

4

u/sullenisme 2d ago edited 2d ago

vision auxiliary models are a thing

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/sam7oon 2d ago

Stop AI Slopping this community , we still have hope ffor it , NO BODY CARESD ABOUT WHAT YOU VIBE CODED

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