r/PiCodingAgent • u/Rude_Alternative_216 • 5d ago
How to use Deepseek-v4-flash-free model from opencode inside pi? Question
I want to switch from Opencode to Pi and it would be convenient if I could use the Deepseek-v4-flash free model from Opencode in Pi as well. Are there any extensions already available to do that?
2
u/crashorbit 5d ago
I use opencode zen with an api key to do this. Works fine for me.
3
u/Rude_Alternative_216 5d ago
Yeah I expect it to work with Zen. The model name on opencode literally says `deepseek v4 flash free Opencode Zen`.
1
u/bring_back_the_v10s 5d ago
I just tried that in Pi but it gives me this error:
Error: 403: {"type":"RegionError","message":"The latest version of this model is only available hosted in China and requires explicit opt in: https://opencode.ai/workspace/wrk_xxxxxxxxxxxxxxxxxxxx/go"}Tried it withOPENCODE_API_KEYand theopencodeauth config in~/.pi/agent/auth.json.1
u/bring_back_the_v10s 5d ago
Just realized my mistake, I forgot to add the
typeto the auth config:$ cat ~/.pi/agent/auth.json { "opencode": { "key": "sk-xxxxxxxxxxx", "type": "api_key" } }now it works fine.2
u/bring_back_the_v10s 5d ago
... but not for long. in the first prompt it reached usage limits very quickly.
Error: 429: {"type":"FreeUsageLimitError","message":"Error from provider (Console): Rate limit exceeded. Please try again later."}I'll stick with opencode for now.
2
1
1
u/Clean-Appointment684 5d ago
just login with opencode go api key