Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "$schema": "https://opencode.ai/config.json",
- "model": "opencode-go/deepseek-v4.1-flash",
- "small_model": "opencode/big-pickle",
- "default_agent": "orchestrator",
- //"websearch": { "provider": "deepseek" },
- // ===========================================================================
- // Canonical OpenCode V2 configuration (global scope).
- //
- // Migrated from the V1 configuration. The original V1 file is preserved
- // alongside this one as "opencode.jsonc.bak" (and in the timestamped backup
- // directory) for reference/maintainability.
- //
- // V1 -> V2 changes applied:
- // - "plugin" -> "plugins"
- // - "compaction.preserve_recent_tokens" -> "compaction.keep.tokens"
- // - "compaction.prune" -> dropped (no native V2 field)
- // - "provider" -> "providers"
- // - model "options" -> model "settings"
- // ===========================================================================
- "plugins": [
- "@tarquinen/opencode-dcp@latest",
- "@slkiser/opencode-quota",
- "oh-my-opencode-slim",
- "@falentio/opencode-todo",
- "@upstash/context7-opencode",
- // { "package": "deepseek-web-retrieval", "options": { "fetchOverrideWebfetch": true } }
- ],
- // ===========================================================================
- // Secret protection — deny reading the OpenCode auth store and SSH material.
- //
- // Rules are last-match-wins, so the catch-all "allow" is listed first and the
- // specific deny patterns follow. `read` matches the file path; every pattern
- // form (relative, ~, $HOME, absolute, and a bare-name fallback) is included
- // because path normalization for permission matching is not documented.
- //
- // NOTE: this only covers the `read` tool. `bash` and MCP tools are separate
- // paths and are NOT restricted here. See docs/PERMISSIONS.md for the harness
- // agent-level blocks.
- // ===========================================================================
- //"permission": {
- // "read": {
- // "*": "allow",
- // "~/.ssh": "deny",
- // "~/.ssh/**": "deny",
- // "$HOME/.ssh": "deny",
- // "$HOME/.ssh/**": "deny",
- // "/home/$USER/.ssh": "deny",
- // "/home/$USER/.ssh/**": "deny",
- // "**/.ssh/**": "deny",
- // "~/.local/share/opencode/auth.json": "deny",
- // "$HOME/.local/share/opencode/auth.json": "deny",
- // "/home/$USER/.local/share/opencode/auth.json": "deny",
- // "**/auth.json": "deny"
- // }
- //},
- "permissions": [
- // Require approval for external-directory access.
- { "action": "external_directory", "resource": "*", "effect": "ask" },
- // DeepSeek websearch/webfetch
- { "action": "websearch", "resource": "*", "effect": "allow" },
- { "action": "webfetch", "resource": "*", "effect": "allow" },
- // { "action": "deepseek_fetch", "resource": "*", "effect": "allow" },
- // General read access.
- { "action": "read", "resource": "*", "effect": "allow"},
- // Protect SSH material and OpenCode authentication.
- { "action": "read", "resource": "~/.ssh", "effect": "deny" },
- { "action": "read", "resource": "~/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "**/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "~/.local/share/opencode/auth.json", "effect": "deny"},
- { "action": "read", "resource": "$HOME/.local/share/opencode/auth.json", "effect": "deny"},
- { "action": "read", "resource": "/home/$USER/.local/share/opencode/auth.json", "effect": "deny"},
- { "action": "read", "resource": "**/auth.json", "effect": "deny" },
- // GitHub tools are scoped per agent through the OMO mcps list; only Wayfinder
- // connects the github server, so no global deny is needed here.
- ],
- // ===========================================================================
- // Same read-deny, applied explicitly to the built-in default agents.
- //
- // The global `permission` block above is merged with each agent's own rules,
- // and AGENT RULES TAKE PRECEDENCE (docs/permissions). Both built-in agents
- // start from a `*: allow` ruleset (build adds `read *.env: ask`; plan adds
- // only `edit` denies), so the deny must be repeated in the agent block to be
- // reliable. Rules are last-match-wins, so the catch-all allow comes first.
- // ===========================================================================
- "agents": {
- "title": {
- "model": "openrouter/free"
- },
- "build": {
- "permissions": [
- { "action": "read", "resource": "*", "effect": "allow" },
- { "action": "read", "resource": "~/.ssh", "effect": "deny" },
- { "action": "read", "resource": "~/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "**/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "~/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "**/auth.json", "effect": "deny" }
- ]
- },
- "plan": {
- "permissions": [
- { "action": "read", "resource": "*", "effect": "allow" },
- { "action": "read", "resource": "~/.ssh", "effect": "deny" },
- { "action": "read", "resource": "~/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "**/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "~/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "**/auth.json", "effect": "deny" }
- ]
- },
- "orchestrator": {
- "permissions": [
- { "action": "read", "resource": "*", "effect": "allow" },
- { "action": "read", "resource": "~/.ssh", "effect": "deny" },
- { "action": "read", "resource": "~/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "**/.ssh/**", "effect": "deny" },
- { "action": "read", "resource": "~/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "$HOME/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "/home/$USER/.local/share/opencode/auth.json", "effect": "deny" },
- { "action": "read", "resource": "**/auth.json", "effect": "deny" }
- ]
- },
- "explore": {
- "disabled": true
- },
- "general": {
- "disabled": true
- },
- "github-helper": {
- "permissions": [
- { "action": "github_*", "resource": "*", "effect": "allow"}
- ]
- },
- "wayfinder": {
- "permissions": [
- { "action": "github_*", "resource": "*", "effect": "allow"}
- ]
- }
- },
- // V1: "compaction": { "auto": true, "prune": false, "preserve_recent_tokens": 20000 }
- //"compaction": {
- // "auto": true,
- // "keep": {
- // "tokens": 20000
- // },
- // "buffer": 20000
- //},
- "compaction": { "auto" : false },
- "warming": {
- "prompt": "Do not perform any work. Reply with exactly: OK",
- "interval": "4 minutes",
- "duration": "2 hours"
- },
- // V1: "provider" -> "providers"; model "options" -> "settings".
- "providers": {
- "openrouter": {
- "models": {
- "deepseek/deepseek-chat-v3-0324": {
- "settings": {
- "provider": {
- "order": ["deepseek"],
- "allow_fallbacks": false
- }
- }
- },
- "deepseek/deepseek-v4.1-flash-1017": {
- "settings": {
- "provider": {
- //"order": ["inference-net/fp8", "cloudflare"],
- "allow_fallbacks": false
- }
- }
- },
- "deepseek/deepseek-v4.1-flash": {
- "settings": {
- "provider": {
- "order": ["streamlake/fp8", "coreweave/fp8", "gmicloud/fp8", "novita/fp8"],
- "only": ["streamlake/fp8", "coreweave/fp8", "gmicloud/fp8", "novita/fp8"],
- "allow_fallbacks": false
- }
- }
- },
- "deepseek/deepseek-v4-flash-0731": {
- "settings": {
- "provider": {
- "order": ["streamlake/fp8"],
- "only": ["streamlake/fp8"],
- "allow_fallbacks": false
- }
- }
- },
- "deepseek/deepseek-v4-pro-0813": {
- "settings": {
- "provider": {
- "order": ["streamlake/fp8", "novita/fp8", "deepseek"],
- "only": ["streamlake/fp8", "novita/fp8", "deepseek"],
- "allow_fallbacks": false
- }
- }
- },
- "openai/gpt-6-luna:flex": {
- "limit": {
- "context": 260000,
- "output": 128000
- },
- "settings": {
- "provider": {
- "order": ["openai/flex"],
- "only": ["openai/flex"],
- "allow_fallbacks": false
- }
- }
- },
- "openai/gpt-5.6-luna:flex": {
- "limit": {
- "context": 260000,
- "output": 128000
- },
- "settings": {
- "provider": {
- "order": ["openai/flex"],
- "only": ["openai/flex"],
- "allow_fallbacks": false
- }
- }
- },
- "z-ai/glm-5.3-flash": {
- "settings": {
- "provider": {
- "order": [ "near-ai/fp8", "streamlake/fp8", "novita/fp8", "z-ai/fp8"], //, "streamlake/fp8", "novita/fp8",
- "only": [ "near-ai/fp8", "streamlake/fp8", "novita/fp8", "z-ai/fp8"], //, "streamlake/fp8", "novita/fp8",
- "allow_fallbacks": false
- }
- }
- },
- "xiaomi/mimo-v2.6-flash": {
- "settings": {
- "provider": {
- "order": ["xiaomi/fp8"],
- "only": ["xiaomi/fp8"],
- "allow_fallbacks": false
- }
- }
- },
- "xiaomi/mimo-v2.6-pro": {
- "settings": {
- "provider": {
- "order": ["xiaomi/fp8"],
- "only": ["xiaomi/fp8"],
- "allow_fallbacks": false
- }
- }
- },
- "stealth/crouton-alpha": {
- "settings": {
- "allow_fallbacks": false
- }
- }
- }
- },
- "deepseek": {}
- },
- "lsp": true,
- "mcp": {
- "context7": {
- "type": "remote",
- "url": "https://mcp.context7.com/mcp",
- "headers": {
- "CONTEXT7_API_KEY": "{file:/run/user/1000/secure-secrets/context7_api_key}"
- },
- "enabled": true
- },
- "github": {
- "type": "remote",
- "url": "https://api.githubcopilot.com/mcp/",
- "enabled": true,
- "oauth": false,
- "headers": {
- "Authorization": "Bearer {file:/run/user/1000/secure-secrets/github_mcp_token_opencode}"
- }
- },
- "firecrawl": {
- "type": "remote",
- "url": "https://mcp.firecrawl.dev/v2/mcp",
- "enabled": true,
- //"headers": {
- // "Authorization": "Bearer <FIRECRAWL_API_KEY>"
- //}
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment