DeepSeek V4.1 Flash, as a model endpoint
OpenAI-compatible chat via OpenRouter, for opencode running on your own machine. API: /agent · checking…
Base URL: … · model deepseek-v4.1-flash
1. Connect opencode once, then just run it
Needs opencode installed (npm i -g opencode-ai). Run once, on your machine:
Then, in any folder you want opencode to work on:
opencode reads this capsule's settings from /.well-known/opencode on every start, so nothing is written to your config. Undo with opencode auth logout.
2. Or without logging in
One run only: the provider is passed inline and merged over your own config.
Or as a permanent config file
Save as ~/.config/opencode/opencode.json (every project) or opencode.json in a project's root.
3. Or, where m64 is installed
m64 deepseek-flash-openrouter-gb10 --ui opencode
Serves this capsule on that machine (or reuses it) and starts opencode with a generated config pointing at it, in the current directory.
What this means
- opencode, your files, your shell and every tool it runs stay on your machine. Only the model calls (your prompts and the file contents opencode sends as context) come to this capsule, and from here to OpenRouter.
- The OpenRouter key stays in the m64 gate: this capsule's container never holds it. It is served with
--allow-external-network (it needs openrouter.ai): the public internet, never your LAN or tailnet.
- There is no token on the tailnet: anyone on your tailnet can use this endpoint, and so spend the key.
Quick test