schema = "m64/capsule@1" description = "DeepSeek V4.1 Flash chat endpoint (OpenRouter). An OpenAI-compatible chat endpoint for DeepSeek V4.1 Flash on OpenRouter, for opencode (or any client) running on your own machine: opencode and its file access stay there, only the model calls come here. Streams. No GPU; the only egress is openrouter.ai:443, and the m64 gate adds the OpenRouter key, so the capsule never holds it." kinds = ["chat"] authors = ["dh7"] license = "apache-2.0" [hardware] platform = "linux-aarch64" [runtime] sandbox = "container" # python:3.12-slim (multi-arch index digest). server.py uses the standard library only. image = "python@sha256:2f17fc044b579bab302c2e8054d3a686e2cb9a83de48e70534b94cd8ebbe06a9" gpu = false internal_port = 9600 health = "/health" expected_load_seconds = 20 # The front rewrites every request's "model" to this; server.py maps it to # deepseek/deepseek-v4.1-flash on OpenRouter. Also the name `m64 --ui opencode` uses. model_name = "deepseek-v4.1-flash" user = "65534:65534" [network] needs = ["openrouter.ai:443"] why = "the model runs on OpenRouter: your prompts and its replies go through openrouter.ai" [secrets] required = ["OPENROUTER_API_KEY"] # The key never enters the container: server.py calls http://openrouter.ai/api/v1 through # the gate, which adds the header and goes on over TLS. The capsule's env var holds only the # placeholder m64-injected:OPENROUTER_API_KEY (and server.py does not even read it). [[secrets.inject]] name = "OPENROUTER_API_KEY" host = "openrouter.ai" header = "Authorization" value = "Bearer {secret}"