Synsema docsENES

Provider config

The provider is selected and configured by the runtime, not the program — the .syn never names a host or key, so it can't redirect the call or leak the key. Each knob resolves process environ > .env > default.

.env (gitignored)

SYNSEMA_LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-...

The key reaches the runtime without entering the process environment — no child process or program can read it (the program would need require secret, and even then sees it redacted). No export/source needed.

Knobs

Env var / .env entryPurposeDefault
ANTHROPIC_API_KEY / OPENAI_API_KEY / MINIMAX_API_KEY / DEEPSEEK_API_KEYAPI key; presence auto-selects the provider— (offline if absent)
SYNSEMA_LLM_PROVIDERForce anthropic / openai / minimax / deepseekauto
SYNSEMA_LLM_MODELModel idclaude-sonnet-4-6 / gpt-4o / MiniMax-M3 / deepseek-chat
SYNSEMA_LLM_MAX_TOKENSOutput cap4096
SYNSEMA_LLM_BASE_URLEndpoint base (point at a local/compatible server)official

You can also force the provider per-run: synsema run app.syn --provider anthropic (flag > env > .env).

Local / on-prem (100% private)

Any OpenAI-compatible server (Ollama, LM Studio, vLLM):

SYNSEMA_LLM_PROVIDER=openai
SYNSEMA_LLM_BASE_URL=http://localhost:11434/v1   # Ollama
SYNSEMA_LLM_MODEL=llama3.1
OPENAI_API_KEY=ollama                            # any non-empty value

The egress to the configured host is part of require llmnot a separate net grant. Offline (no key), the ops return placeholders; branch on llm_available(). To bypass the built-in ops entirely and hit the API yourself, see Provider API directly.