diff --git a/STATS.md b/STATS.md
index e35377db..aedfa87c 100644
--- a/STATS.md
+++ b/STATS.md
@@ -123,3 +123,5 @@
| 2025-10-27 | 589,999 (+5,590) | 526,001 (+4,822) | 1,116,000 (+10,412) |
| 2025-10-28 | 595,776 (+5,777) | 532,438 (+6,437) | 1,128,214 (+12,214) |
| 2025-10-29 | 606,259 (+10,483) | 542,064 (+9,626) | 1,148,323 (+20,109) |
+| 2025-10-30 | 613,746 (+7,487) | 542,064 (+0) | 1,155,810 (+7,487) |
+| 2025-10-30 | 617,846 (+4,100) | 555,026 (+12,962) | 1,172,872 (+17,062) |
diff --git a/bun.lock b/bun.lock
index b76d6b5e..dc3f6b62 100644
--- a/bun.lock
+++ b/bun.lock
@@ -37,7 +37,7 @@
},
"packages/console/core": {
"name": "@opencode-ai/console-core",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@aws-sdk/client-sts": "3.782.0",
"@jsx-email/render": "1.1.1",
@@ -64,7 +64,7 @@
},
"packages/console/function": {
"name": "@opencode-ai/console-function",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@ai-sdk/anthropic": "2.0.0",
"@ai-sdk/openai": "2.0.2",
@@ -88,7 +88,7 @@
},
"packages/console/mail": {
"name": "@opencode-ai/console-mail",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
@@ -109,7 +109,7 @@
},
"packages/desktop": {
"name": "@opencode-ai/desktop",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@kobalte/core": "catalog:",
"@opencode-ai/sdk": "workspace:*",
@@ -150,7 +150,7 @@
},
"packages/function": {
"name": "@opencode-ai/function",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@octokit/auth-app": "8.0.1",
"@octokit/rest": "22.0.0",
@@ -166,7 +166,7 @@
},
"packages/opencode": {
"name": "opencode",
- "version": "0.15.28",
+ "version": "0.15.29",
"bin": {
"opencode": "./bin/opencode",
},
@@ -234,7 +234,7 @@
},
"packages/plugin": {
"name": "@opencode-ai/plugin",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@opencode-ai/sdk": "workspace:*",
"zod": "catalog:",
@@ -254,7 +254,7 @@
},
"packages/sdk/js": {
"name": "@opencode-ai/sdk",
- "version": "0.15.28",
+ "version": "0.15.29",
"devDependencies": {
"@hey-api/openapi-ts": "0.81.0",
"@tsconfig/node22": "catalog:",
@@ -265,7 +265,7 @@
},
"packages/slack": {
"name": "@opencode-ai/slack",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@opencode-ai/sdk": "workspace:*",
"@slack/bolt": "^3.17.1",
@@ -278,7 +278,7 @@
},
"packages/ui": {
"name": "@opencode-ai/ui",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@kobalte/core": "catalog:",
"@pierre/precision-diffs": "catalog:",
@@ -301,7 +301,7 @@
},
"packages/web": {
"name": "@opencode-ai/web",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@astrojs/cloudflare": "12.6.3",
"@astrojs/markdown-remark": "6.3.1",
diff --git a/packages/console/app/package.json b/packages/console/app/package.json
index 464f1279..ec70d7c4 100644
--- a/packages/console/app/package.json
+++ b/packages/console/app/package.json
@@ -7,7 +7,7 @@
"dev:remote": "VITE_AUTH_URL=https://auth.dev.opencode.ai bun sst shell --stage=dev bun dev",
"build": "vinxi build && ../../opencode/script/schema.ts ./.output/public/config.json",
"start": "vinxi start",
- "version": "0.15.28"
+ "version": "0.15.29"
},
"dependencies": {
"@ibm/plex": "6.4.1",
diff --git a/packages/console/app/src/routes/api/enterprise.ts b/packages/console/app/src/routes/api/enterprise.ts
index d937be54..3dc00adb 100644
--- a/packages/console/app/src/routes/api/enterprise.ts
+++ b/packages/console/app/src/routes/api/enterprise.ts
@@ -25,19 +25,15 @@ export async function POST(event: APIEvent) {
// Create email content
const emailContent = `
-New Enterprise Inquiry
-
-Name: ${body.name}
-Role: ${body.role}
-Email: ${body.email}
-
-Message:
-${body.message}
- `.trim()
+${body.message}
+--
+${body.name}
+${body.role}
+${body.email}`.trim()
// Send email using AWS SES
await AWS.sendEmail({
- to: "enterprise@opencode.ai",
+ to: "contact@anoma.ly",
subject: `Enterprise Inquiry from ${body.name}`,
body: emailContent,
})
diff --git a/packages/console/app/src/routes/enterprise/index.tsx b/packages/console/app/src/routes/enterprise/index.tsx
index 9599ad38..5bca6f38 100644
--- a/packages/console/app/src/routes/enterprise/index.tsx
+++ b/packages/console/app/src/routes/enterprise/index.tsx
@@ -1,6 +1,6 @@
import "./index.css"
import { Title, Meta } from "@solidjs/meta"
-import { createSignal } from "solid-js"
+import { createSignal, Show } from "solid-js"
import { Header } from "~/component/header"
import { Footer } from "~/component/footer"
import { Legal } from "~/component/legal"
@@ -64,60 +64,96 @@ export default function Enterprise() {
Your code is yours
- OpenCode operates securely inside your organization with no data or context stored and no licensing restrictions or ownership claims. Start a trial with your team today, then scale confidently with enterprise-grade features including SSO, private registries, and self-hosting.
-
-
- Let us know and how we can help.
+ OpenCode operates securely inside your organization with no data or context stored
+ and no licensing restrictions or ownership claims. Start a trial with your team
+ , then deploy it across your organization by integrating it with your SSO and internal AI gateway.
+
Let us know and how we can help.
+
-
+
+ fill="currentColor"
+ />
-
-
- Thanks to OpenCode, we found a way to create software to track all our assets — even the imaginary ones.
-
+ Thanks to OpenCode, we found a way to create software to track all our assets —
+ even the imaginary ones.
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
@@ -130,7 +166,7 @@ export default function Enterprise() {
type="text"
required
value={formData().name}
- onInput={handleInputChange('name')}
+ onInput={handleInputChange("name")}
placeholder="Jeff Bezos"
/>
@@ -142,7 +178,7 @@ export default function Enterprise() {
type="text"
required
value={formData().role}
- onInput={handleInputChange('role')}
+ onInput={handleInputChange("role")}
placeholder="Executive Chairman"
/>
@@ -154,27 +190,25 @@ export default function Enterprise() {
type="email"
required
value={formData().email}
- onInput={handleInputChange('email')}
+ onInput={handleInputChange("email")}
placeholder="jeff@amazon.com"
/>
- What problem are you trying to
- solve?
+ What problem are you trying to solve?
-
- {isSubmitting() ? 'Sending...' : 'Send'}
+
+ {isSubmitting() ? "Sending..." : "Send"}
@@ -194,53 +228,32 @@ export default function Enterprise() {
-
- No. OpenCode never stores your code or context data. All
- processing happens locally or directly with your AI provider.
+
+ OpenCode Enterprise is for organizations that want to ensure that their code and
+ data never leaves their infrastructure. It can do this by using a centralized
+ config that integrates with your SSO and internal AI gateway.
-
- You do. All code produced is yours, with no licensing
- restrictions or ownership claims.
+
+ Simply start with an internal trial with your team. OpenCode by default does not
+ store your code or context data, making it easy to get started. Then contact us to
+ discuss pricing and implementation options.
-
- Simply install and run an internal trial with your team. Since
- OpenCode doesn’t store any data, your developers can get
- started right away.
+
+ We offer per-seat enterprise pricing. If you have your own LLM gateway, we do not
+ charge for tokens used. For further details, contact us for a custom quote based
+ on your organization's needs.
-
- By default, sharing is disabled. If enabled, conversations are
- sent to our share service and cached through our CDN. For
- enterprise use, we recommend disabling or self-hosting this
- feature.
-
-
-
-
- Yes. Enterprise deployments can include SSO integration so all
- sessions and shared conversations are protected by your
- authentication system.
-
-
-
-
- Absolutely. You can fully self-host OpenCode, including the
- share feature, ensuring that data and pages are accessible
- only after authentication.
-
-
-
-
- Contact us to discuss pricing, implementation, and enterprise
- options like SSO, private registries, and self-hosting.
+
+ Yes. OpenCode does not store your code or context data. All processing happens
+ locally or through direct API calls to your AI provider. With central config and
+ SSO integration, your data remains secure within your organization's
+ infrastructure.
diff --git a/packages/console/core/package.json b/packages/console/core/package.json
index 33568761..36e37c3b 100644
--- a/packages/console/core/package.json
+++ b/packages/console/core/package.json
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/console-core",
- "version": "0.15.28",
+ "version": "0.15.29",
"private": true,
"type": "module",
"dependencies": {
diff --git a/packages/console/function/package.json b/packages/console/function/package.json
index 179ee007..6f13c948 100644
--- a/packages/console/function/package.json
+++ b/packages/console/function/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-function",
- "version": "0.15.28",
+ "version": "0.15.29",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
diff --git a/packages/console/mail/package.json b/packages/console/mail/package.json
index 5aa23d2c..b01703b4 100644
--- a/packages/console/mail/package.json
+++ b/packages/console/mail/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-mail",
- "version": "0.15.28",
+ "version": "0.15.29",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
diff --git a/packages/desktop/package.json b/packages/desktop/package.json
index cf605788..40081521 100644
--- a/packages/desktop/package.json
+++ b/packages/desktop/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/desktop",
- "version": "0.15.28",
+ "version": "0.15.29",
"description": "",
"type": "module",
"scripts": {
diff --git a/packages/function/package.json b/packages/function/package.json
index fabb7168..eb185809 100644
--- a/packages/function/package.json
+++ b/packages/function/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/function",
- "version": "0.15.28",
+ "version": "0.15.29",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
diff --git a/packages/opencode/package.json b/packages/opencode/package.json
index 53863f93..d8ffc751 100644
--- a/packages/opencode/package.json
+++ b/packages/opencode/package.json
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
- "version": "0.15.28",
+ "version": "0.15.29",
"name": "opencode",
"type": "module",
"private": true,
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index 83c518a6..12a5c162 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -12,7 +12,11 @@ import { NamedError } from "../util/error"
import matter from "gray-matter"
import { Flag } from "../flag/flag"
import { Auth } from "../auth"
-import { type ParseError as JsoncParseError, parse as parseJsonc, printParseErrorCode } from "jsonc-parser"
+import {
+ type ParseError as JsoncParseError,
+ parse as parseJsonc,
+ printParseErrorCode,
+} from "jsonc-parser"
import { Instance } from "../project/instance"
import { LSPServer } from "../lsp/server"
import { BunProc } from "@/bun"
@@ -46,7 +50,10 @@ export namespace Config {
if (value.type === "wellknown") {
process.env[value.key] = value.token
const wellknown = await fetch(`${key}/.well-known/opencode`).then((x) => x.json())
- result = mergeDeep(result, await load(JSON.stringify(wellknown.config ?? {}), process.cwd()))
+ result = mergeDeep(
+ result,
+ await load(JSON.stringify(wellknown.config ?? {}), process.cwd()),
+ )
}
}
@@ -57,7 +64,11 @@ export namespace Config {
const directories = [
Global.Path.config,
...(await Array.fromAsync(
- Filesystem.up({ targets: [".opencode"], start: Instance.directory, stop: Instance.worktree }),
+ Filesystem.up({
+ targets: [".opencode"],
+ start: Instance.directory,
+ stop: Instance.worktree,
+ }),
)),
]
@@ -153,10 +164,18 @@ export namespace Config {
const gitignore = path.join(dir, ".gitignore")
const hasGitIgnore = await Bun.file(gitignore).exists()
- if (!hasGitIgnore) await Bun.write(gitignore, ["node_modules", "package.json", "bun.lock", ".gitignore"].join("\n"))
+ if (!hasGitIgnore)
+ await Bun.write(
+ gitignore,
+ ["node_modules", "package.json", "bun.lock", ".gitignore"].join("\n"),
+ )
await BunProc.run(
- ["add", "@opencode-ai/plugin@" + (Installation.isLocal() ? "latest" : Installation.VERSION), "--exact"],
+ [
+ "add",
+ "@opencode-ai/plugin@" + (Installation.isLocal() ? "latest" : Installation.VERSION),
+ "--exact",
+ ],
{
cwd: dir,
},
@@ -166,7 +185,12 @@ export namespace Config {
const COMMAND_GLOB = new Bun.Glob("command/**/*.md")
async function loadCommand(dir: string) {
const result: Record = {}
- for await (const item of COMMAND_GLOB.scan({ absolute: true, followSymlinks: true, dot: true, cwd: dir })) {
+ for await (const item of COMMAND_GLOB.scan({
+ absolute: true,
+ followSymlinks: true,
+ dot: true,
+ cwd: dir,
+ })) {
const content = await Bun.file(item).text()
const md = matter(content)
if (!md.data) continue
@@ -201,7 +225,12 @@ export namespace Config {
async function loadAgent(dir: string) {
const result: Record = {}
- for await (const item of AGENT_GLOB.scan({ absolute: true, followSymlinks: true, dot: true, cwd: dir })) {
+ for await (const item of AGENT_GLOB.scan({
+ absolute: true,
+ followSymlinks: true,
+ dot: true,
+ cwd: dir,
+ })) {
const content = await Bun.file(item).text()
const md = matter(content)
if (!md.data) continue
@@ -239,7 +268,12 @@ export namespace Config {
const MODE_GLOB = new Bun.Glob("mode/*.md")
async function loadMode(dir: string) {
const result: Record = {}
- for await (const item of MODE_GLOB.scan({ absolute: true, followSymlinks: true, dot: true, cwd: dir })) {
+ for await (const item of MODE_GLOB.scan({
+ absolute: true,
+ followSymlinks: true,
+ dot: true,
+ cwd: dir,
+ })) {
const content = await Bun.file(item).text()
const md = matter(content)
if (!md.data) continue
@@ -265,7 +299,12 @@ export namespace Config {
async function loadPlugin(dir: string) {
const plugins: string[] = []
- for await (const item of PLUGIN_GLOB.scan({ absolute: true, followSymlinks: true, dot: true, cwd: dir })) {
+ for await (const item of PLUGIN_GLOB.scan({
+ absolute: true,
+ followSymlinks: true,
+ dot: true,
+ cwd: dir,
+ })) {
plugins.push("file://" + item)
}
return plugins
@@ -280,6 +319,14 @@ export namespace Config {
.optional()
.describe("Environment variables to set when running the MCP server"),
enabled: z.boolean().optional().describe("Enable or disable the MCP server on startup"),
+ timeout: z
+ .number()
+ .int()
+ .positive()
+ .optional()
+ .describe(
+ "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
+ ),
})
.strict()
.meta({
@@ -291,7 +338,18 @@ export namespace Config {
type: z.literal("remote").describe("Type of MCP server connection"),
url: z.string().describe("URL of the remote MCP server"),
enabled: z.boolean().optional().describe("Enable or disable the MCP server on startup"),
- headers: z.record(z.string(), z.string()).optional().describe("Headers to send with the request"),
+ headers: z
+ .record(z.string(), z.string())
+ .optional()
+ .describe("Headers to send with the request"),
+ timeout: z
+ .number()
+ .int()
+ .positive()
+ .optional()
+ .describe(
+ "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
+ ),
})
.strict()
.meta({
@@ -339,72 +397,148 @@ export namespace Config {
export const Keybinds = z
.object({
- leader: z.string().optional().default("ctrl+x").describe("Leader key for keybind combinations"),
+ leader: z
+ .string()
+ .optional()
+ .default("ctrl+x")
+ .describe("Leader key for keybind combinations"),
app_help: z.string().optional().default("h").describe("Show help dialog"),
app_exit: z.string().optional().default("ctrl+c,q").describe("Exit the application"),
editor_open: z.string().optional().default("e").describe("Open external editor"),
theme_list: z.string().optional().default("t").describe("List available themes"),
project_init: z.string().optional().default("i").describe("Create/update AGENTS.md"),
tool_details: z.string().optional().default("d").describe("Toggle tool details"),
- thinking_blocks: z.string().optional().default("b").describe("Toggle thinking blocks"),
- session_export: z.string().optional().default("x").describe("Export session to editor"),
+ thinking_blocks: z
+ .string()
+ .optional()
+ .default("b")
+ .describe("Toggle thinking blocks"),
+ session_export: z
+ .string()
+ .optional()
+ .default("x")
+ .describe("Export session to editor"),
session_new: z.string().optional().default("n").describe("Create a new session"),
session_list: z.string().optional().default("l").describe("List all sessions"),
- session_timeline: z.string().optional().default("g").describe("Show session timeline"),
+ session_timeline: z
+ .string()
+ .optional()
+ .default("g")
+ .describe("Show session timeline"),
session_share: z.string().optional().default("s").describe("Share current session"),
session_unshare: z.string().optional().default("none").describe("Unshare current session"),
session_interrupt: z.string().optional().default("esc").describe("Interrupt current session"),
session_compact: z.string().optional().default("c").describe("Compact the session"),
- session_child_cycle: z.string().optional().default("ctrl+right").describe("Cycle to next child session"),
+ session_child_cycle: z
+ .string()
+ .optional()
+ .default("ctrl+right")
+ .describe("Cycle to next child session"),
session_child_cycle_reverse: z
.string()
.optional()
.default("ctrl+left")
.describe("Cycle to previous child session"),
- messages_page_up: z.string().optional().default("pgup").describe("Scroll messages up by one page"),
- messages_page_down: z.string().optional().default("pgdown").describe("Scroll messages down by one page"),
- messages_half_page_up: z.string().optional().default("ctrl+alt+u").describe("Scroll messages up by half page"),
+ messages_page_up: z
+ .string()
+ .optional()
+ .default("pgup")
+ .describe("Scroll messages up by one page"),
+ messages_page_down: z
+ .string()
+ .optional()
+ .default("pgdown")
+ .describe("Scroll messages down by one page"),
+ messages_half_page_up: z
+ .string()
+ .optional()
+ .default("ctrl+alt+u")
+ .describe("Scroll messages up by half page"),
messages_half_page_down: z
.string()
.optional()
.default("ctrl+alt+d")
.describe("Scroll messages down by half page"),
messages_first: z.string().optional().default("ctrl+g").describe("Navigate to first message"),
- messages_last: z.string().optional().default("ctrl+alt+g").describe("Navigate to last message"),
+ messages_last: z
+ .string()
+ .optional()
+ .default("ctrl+alt+g")
+ .describe("Navigate to last message"),
messages_copy: z.string().optional().default("y").describe("Copy message"),
messages_undo: z.string().optional().default("u").describe("Undo message"),
messages_redo: z.string().optional().default("r").describe("Redo message"),
model_list: z.string().optional().default("m").describe("List available models"),
model_cycle_recent: z.string().optional().default("f2").describe("Next recent model"),
- model_cycle_recent_reverse: z.string().optional().default("shift+f2").describe("Previous recent model"),
+ model_cycle_recent_reverse: z
+ .string()
+ .optional()
+ .default("shift+f2")
+ .describe("Previous recent model"),
agent_list: z.string().optional().default("a").describe("List agents"),
agent_cycle: z.string().optional().default("tab").describe("Next agent"),
agent_cycle_reverse: z.string().optional().default("shift+tab").describe("Previous agent"),
input_clear: z.string().optional().default("ctrl+c").describe("Clear input field"),
input_paste: z.string().optional().default("ctrl+v").describe("Paste from clipboard"),
input_submit: z.string().optional().default("enter").describe("Submit input"),
- input_newline: z.string().optional().default("shift+enter,ctrl+j").describe("Insert newline in input"),
+ input_newline: z
+ .string()
+ .optional()
+ .default("shift+enter,ctrl+j")
+ .describe("Insert newline in input"),
// Deprecated commands
- switch_mode: z.string().optional().default("none").describe("@deprecated use agent_cycle. Next mode"),
+ switch_mode: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated use agent_cycle. Next mode"),
switch_mode_reverse: z
.string()
.optional()
.default("none")
.describe("@deprecated use agent_cycle_reverse. Previous mode"),
- switch_agent: z.string().optional().default("tab").describe("@deprecated use agent_cycle. Next agent"),
+ switch_agent: z
+ .string()
+ .optional()
+ .default("tab")
+ .describe("@deprecated use agent_cycle. Next agent"),
switch_agent_reverse: z
.string()
.optional()
.default("shift+tab")
.describe("@deprecated use agent_cycle_reverse. Previous agent"),
- file_list: z.string().optional().default("none").describe("@deprecated Currently not available. List files"),
+ file_list: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated Currently not available. List files"),
file_close: z.string().optional().default("none").describe("@deprecated Close file"),
file_search: z.string().optional().default("none").describe("@deprecated Search file"),
- file_diff_toggle: z.string().optional().default("none").describe("@deprecated Split/unified diff"),
- messages_previous: z.string().optional().default("none").describe("@deprecated Navigate to previous message"),
- messages_next: z.string().optional().default("none").describe("@deprecated Navigate to next message"),
- messages_layout_toggle: z.string().optional().default("none").describe("@deprecated Toggle layout"),
- messages_revert: z.string().optional().default("none").describe("@deprecated use messages_undo. Revert message"),
+ file_diff_toggle: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated Split/unified diff"),
+ messages_previous: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated Navigate to previous message"),
+ messages_next: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated Navigate to next message"),
+ messages_layout_toggle: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated Toggle layout"),
+ messages_revert: z
+ .string()
+ .optional()
+ .default("none")
+ .describe("@deprecated use messages_undo. Revert message"),
})
.strict()
.meta({
@@ -446,13 +580,23 @@ export namespace Config {
autoshare: z
.boolean()
.optional()
- .describe("@deprecated Use 'share' field instead. Share newly created sessions automatically"),
+ .describe(
+ "@deprecated Use 'share' field instead. Share newly created sessions automatically",
+ ),
autoupdate: z.boolean().optional().describe("Automatically update to the latest version"),
- disabled_providers: z.array(z.string()).optional().describe("Disable providers that are loaded automatically"),
- model: z.string().describe("Model to use in the format of provider/model, eg anthropic/claude-2").optional(),
+ disabled_providers: z
+ .array(z.string())
+ .optional()
+ .describe("Disable providers that are loaded automatically"),
+ model: z
+ .string()
+ .describe("Model to use in the format of provider/model, eg anthropic/claude-2")
+ .optional(),
small_model: z
.string()
- .describe("Small model to use for tasks like title generation in the format of provider/model")
+ .describe(
+ "Small model to use for tasks like title generation in the format of provider/model",
+ )
.optional(),
username: z
.string()
@@ -508,7 +652,10 @@ export namespace Config {
)
.optional()
.describe("Custom provider configurations and model overrides"),
- mcp: z.record(z.string(), Mcp).optional().describe("MCP (Model Context Protocol) server configurations"),
+ mcp: z
+ .record(z.string(), Mcp)
+ .optional()
+ .describe("MCP (Model Context Protocol) server configurations"),
formatter: z
.record(
z.string(),
@@ -552,7 +699,10 @@ export namespace Config {
error: "For custom LSP servers, 'extensions' array is required.",
},
),
- instructions: z.array(z.string()).optional().describe("Additional instruction files or patterns to include"),
+ instructions: z
+ .array(z.string())
+ .optional()
+ .describe("Additional instruction files or patterns to include"),
layout: Layout.optional().describe("@deprecated Always uses stretch layout."),
permission: z
.object({
@@ -586,7 +736,10 @@ export namespace Config {
.optional(),
})
.optional(),
- chatMaxRetries: z.number().optional().describe("Number of retries for chat completions on failure"),
+ chatMaxRetries: z
+ .number()
+ .optional()
+ .describe("Number of retries for chat completions on failure"),
disable_paste_summary: z.boolean().optional(),
})
.optional(),
@@ -616,7 +769,10 @@ export namespace Config {
if (provider && model) result.model = `${provider}/${model}`
result["$schema"] = "https://opencode.ai/config.json"
result = mergeDeep(result, rest)
- await Bun.write(path.join(Global.Path.config, "config.json"), JSON.stringify(result, null, 2))
+ await Bun.write(
+ path.join(Global.Path.config, "config.json"),
+ JSON.stringify(result, null, 2),
+ )
await fs.unlink(path.join(Global.Path.config, "config"))
})
.catch(() => {})
@@ -655,7 +811,9 @@ export namespace Config {
if (filePath.startsWith("~/")) {
filePath = path.join(os.homedir(), filePath.slice(2))
}
- const resolvedPath = path.isAbsolute(filePath) ? filePath : path.resolve(configDir, filePath)
+ const resolvedPath = path.isAbsolute(filePath)
+ ? filePath
+ : path.resolve(configDir, filePath)
const fileContent = (
await Bun.file(resolvedPath)
.text()
diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts
index 988426b1..0df6a5a7 100644
--- a/packages/opencode/src/mcp/index.ts
+++ b/packages/opencode/src/mcp/index.ts
@@ -167,7 +167,7 @@ export namespace MCP {
return
}
- const result = await withTimeout(mcpClient.tools(), 5000).catch(() => {})
+ const result = await withTimeout(mcpClient.tools(), mcp.timeout ?? 5000).catch(() => { })
if (!result) {
log.warn("mcp client verification failed, dropping client", { name })
return
diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts
index 43bb7370..96dfbad0 100644
--- a/packages/opencode/src/session/prompt.ts
+++ b/packages/opencode/src/session/prompt.ts
@@ -56,6 +56,7 @@ export namespace SessionPrompt {
const log = Log.create({ service: "session.prompt" })
export const OUTPUT_TOKEN_MAX = 32_000
const MAX_RETRIES = 10
+ const DOOM_LOOP_THRESHOLD = 3
export const Event = {
Idle: Bus.event(
@@ -360,21 +361,21 @@ export namespace SessionPrompt {
const stop = await SessionRetry.sleep(delayMs, abort.signal)
.then(() => false)
.catch((error) => {
+ let err = error
if (error instanceof DOMException && error.name === "AbortError") {
- const err = new MessageV2.AbortedError(
+ err = new MessageV2.AbortedError(
{ message: error.message },
{
cause: error,
},
).toObject()
- result.info.error = err
- Bus.publish(Session.Event.Error, {
- sessionID: result.info.sessionID,
- error: result.info.error,
- })
- return true
}
- throw error
+ result.info.error = err
+ Bus.publish(Session.Event.Error, {
+ sessionID: result.info.sessionID,
+ error: result.info.error,
+ })
+ return true
})
if (stop) break
@@ -1068,6 +1069,32 @@ export namespace SessionPrompt {
metadata: value.providerMetadata,
})
toolcalls[value.toolCallId] = part as MessageV2.ToolPart
+
+ const parts = await Session.getParts(assistantMsg.id)
+ const lastThree = parts.slice(-DOOM_LOOP_THRESHOLD)
+ if (
+ lastThree.length === DOOM_LOOP_THRESHOLD &&
+ lastThree.every(
+ (p) =>
+ p.type === "tool" &&
+ p.tool === value.toolName &&
+ p.state.status !== "pending" &&
+ JSON.stringify(p.state.input) === JSON.stringify(value.input),
+ )
+ ) {
+ await Permission.ask({
+ type: "doom-loop",
+ pattern: value.toolName,
+ sessionID: assistantMsg.sessionID,
+ messageID: assistantMsg.id,
+ callID: value.toolCallId,
+ title: `Possible doom loop: "${value.toolName}" called ${DOOM_LOOP_THRESHOLD} times with identical arguments`,
+ metadata: {
+ tool: value.toolName,
+ input: value.input,
+ },
+ })
+ }
}
break
}
diff --git a/packages/plugin/package.json b/packages/plugin/package.json
index 01d84a1a..53b90e0c 100644
--- a/packages/plugin/package.json
+++ b/packages/plugin/package.json
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
- "version": "0.15.28",
+ "version": "0.15.29",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json
index 88a1595f..3c00bafc 100644
--- a/packages/sdk/js/package.json
+++ b/packages/sdk/js/package.json
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
- "version": "0.15.28",
+ "version": "0.15.29",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts
index 14343f5a..0ff1f032 100644
--- a/packages/sdk/js/src/gen/types.gen.ts
+++ b/packages/sdk/js/src/gen/types.gen.ts
@@ -275,6 +275,10 @@ export type McpLocalConfig = {
* Enable or disable the MCP server on startup
*/
enabled?: boolean
+ /**
+ * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
+ */
+ timeout?: number
}
export type McpRemoteConfig = {
@@ -296,6 +300,10 @@ export type McpRemoteConfig = {
headers?: {
[key: string]: string
}
+ /**
+ * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
+ */
+ timeout?: number
}
/**
diff --git a/packages/slack/package.json b/packages/slack/package.json
index e41e63cd..28df5773 100644
--- a/packages/slack/package.json
+++ b/packages/slack/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/slack",
- "version": "0.15.28",
+ "version": "0.15.29",
"type": "module",
"scripts": {
"dev": "bun run src/index.ts",
diff --git a/packages/tui/cmd/opencode/main.go b/packages/tui/cmd/opencode/main.go
index 22841fc8..3a7d1848 100644
--- a/packages/tui/cmd/opencode/main.go
+++ b/packages/tui/cmd/opencode/main.go
@@ -13,9 +13,11 @@ import (
flag "github.com/spf13/pflag"
"github.com/sst/opencode-sdk-go"
"github.com/sst/opencode-sdk-go/option"
+ "github.com/sst/opencode-sdk-go/packages/ssestream"
"github.com/sst/opencode/internal/api"
"github.com/sst/opencode/internal/app"
"github.com/sst/opencode/internal/clipboard"
+ "github.com/sst/opencode/internal/decoders"
"github.com/sst/opencode/internal/tui"
"github.com/sst/opencode/internal/util"
"golang.org/x/sync/errgroup"
@@ -61,6 +63,11 @@ func main() {
}
}
+ // Register custom SSE decoder to handle large events (>32MB)
+ // This is a workaround for the bufio.Scanner token size limit in the auto-generated SDK
+ // See: packages/tui/internal/decoders/decoder.go
+ ssestream.RegisterDecoder("text/event-stream", decoders.NewUnboundedDecoder)
+
httpClient := opencode.NewClient(
option.WithBaseURL(url),
)
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go
index fc5a21ad..801545a8 100644
--- a/packages/tui/internal/components/chat/message.go
+++ b/packages/tui/internal/components/chat/message.go
@@ -504,7 +504,11 @@ func renderToolDetails(
base := styles.NewStyle().Background(backgroundColor)
text := base.Foreground(t.Text()).Bold(true).Render
muted := base.Foreground(t.TextMuted()).Render
- permissionContent = "Permission required to run this tool:\n\n"
+ if permission.Type == "doom-loop" {
+ permissionContent = permission.Title + "\n\n"
+ } else {
+ permissionContent = "Permission required to run this tool:\n\n"
+ }
permissionContent += text(
"enter ",
) + muted(
@@ -642,9 +646,9 @@ func renderToolDetails(
for _, item := range todos.([]any) {
todo := item.(map[string]any)
content := todo["content"]
- if content == nil {
- continue
- }
+ if content == nil {
+ continue
+ }
switch todo["status"] {
case "completed":
body += fmt.Sprintf("- [x] %s\n", content)
diff --git a/packages/tui/internal/components/chat/messages.go b/packages/tui/internal/components/chat/messages.go
index a09e809f..3d52b84e 100644
--- a/packages/tui/internal/components/chat/messages.go
+++ b/packages/tui/internal/components/chat/messages.go
@@ -656,6 +656,8 @@ func (m *messagesComponent) renderView() tea.Cmd {
case nil:
case opencode.AssistantMessageErrorMessageOutputLengthError:
error = "Message output length exceeded"
+ case opencode.AssistantMessageErrorAPIError:
+ error = err.Data.Message
case opencode.ProviderAuthError:
error = err.Data.Message
case opencode.MessageAbortedError:
diff --git a/packages/tui/internal/decoders/decoder.go b/packages/tui/internal/decoders/decoder.go
new file mode 100644
index 00000000..efb69920
--- /dev/null
+++ b/packages/tui/internal/decoders/decoder.go
@@ -0,0 +1,118 @@
+package decoders
+
+import (
+ "bufio"
+ "bytes"
+ "io"
+
+ "github.com/sst/opencode-sdk-go/packages/ssestream"
+)
+
+// UnboundedDecoder is an SSE decoder that uses bufio.Reader instead of bufio.Scanner
+// to avoid the 32MB token size limit. This is a workaround for large SSE events until
+// the upstream Stainless SDK is fixed.
+//
+// This decoder handles SSE events of unlimited size by reading line-by-line with
+// bufio.Reader.ReadBytes('\n'), which dynamically grows the buffer as needed.
+type UnboundedDecoder struct {
+ reader *bufio.Reader
+ closer io.ReadCloser
+ evt ssestream.Event
+ err error
+}
+
+// NewUnboundedDecoder creates a new unbounded SSE decoder with a 1MB initial buffer size
+func NewUnboundedDecoder(rc io.ReadCloser) ssestream.Decoder {
+ reader := bufio.NewReaderSize(rc, 1024*1024) // 1MB initial buffer
+ return &UnboundedDecoder{
+ reader: reader,
+ closer: rc,
+ }
+}
+
+// Next reads and decodes the next SSE event from the stream
+func (d *UnboundedDecoder) Next() bool {
+ if d.err != nil {
+ return false
+ }
+
+ event := ""
+ data := bytes.NewBuffer(nil)
+
+ for {
+ line, err := d.reader.ReadBytes('\n')
+ if err != nil {
+ if err == io.EOF && len(line) == 0 {
+ return false
+ }
+ if err != io.EOF {
+ d.err = err
+ return false
+ }
+ }
+
+ // Remove trailing newline characters
+ line = bytes.TrimRight(line, "\r\n")
+
+ // Empty line indicates end of event
+ if len(line) == 0 {
+ if data.Len() > 0 || event != "" {
+ d.evt = ssestream.Event{
+ Type: event,
+ Data: data.Bytes(),
+ }
+ return true
+ }
+ continue
+ }
+
+ // Skip comments (lines starting with ':')
+ if line[0] == ':' {
+ continue
+ }
+
+ // Parse field
+ name, value, found := bytes.Cut(line, []byte(":"))
+ if !found {
+ // Field with no value
+ continue
+ }
+
+ // Remove leading space from value
+ if len(value) > 0 && value[0] == ' ' {
+ value = value[1:]
+ }
+
+ switch string(name) {
+ case "":
+ // An empty line in the form ": something" is a comment and should be ignored
+ continue
+ case "event":
+ event = string(value)
+ case "data":
+ _, d.err = data.Write(value)
+ if d.err != nil {
+ return false
+ }
+ _, d.err = data.WriteRune('\n')
+ if d.err != nil {
+ return false
+ }
+ }
+ }
+}
+
+// Event returns the current event
+func (d *UnboundedDecoder) Event() ssestream.Event {
+ return d.evt
+}
+
+// Close closes the underlying reader
+func (d *UnboundedDecoder) Close() error {
+ return d.closer.Close()
+}
+
+// Err returns any error that occurred during decoding
+func (d *UnboundedDecoder) Err() error {
+ return d.err
+}
diff --git a/packages/tui/internal/decoders/decoder_test.go b/packages/tui/internal/decoders/decoder_test.go
new file mode 100644
index 00000000..e5ad1d55
--- /dev/null
+++ b/packages/tui/internal/decoders/decoder_test.go
@@ -0,0 +1,194 @@
+package decoders
+
+import (
+ "bytes"
+ "io"
+ "strings"
+ "testing"
+)
+
+func TestUnboundedDecoder_SmallEvent(t *testing.T) {
+ data := "event: test\ndata: hello world\n\n"
+ rc := io.NopCloser(strings.NewReader(data))
+ decoder := NewUnboundedDecoder(rc)
+
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true")
+ }
+
+ evt := decoder.Event()
+ if evt.Type != "test" {
+ t.Errorf("Expected event type 'test', got '%s'", evt.Type)
+ }
+ if string(evt.Data) != "hello world\n" {
+ t.Errorf("Expected data 'hello world\\n', got '%s'", string(evt.Data))
+ }
+
+ if decoder.Next() {
+ t.Error("Expected Next() to return false at end of stream")
+ }
+
+ if err := decoder.Err(); err != nil {
+ t.Errorf("Expected no error, got %v", err)
+ }
+}
+
+func TestUnboundedDecoder_LargeEvent(t *testing.T) {
+ // Create a large event (50MB)
+ size := 50 * 1024 * 1024
+ largeData := strings.Repeat("x", size)
+
+ var buf bytes.Buffer
+ buf.WriteString("event: large\n")
+ buf.WriteString("data: ")
+ buf.WriteString(largeData)
+ buf.WriteString("\n\n")
+
+ rc := io.NopCloser(&buf)
+ decoder := NewUnboundedDecoder(rc)
+
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true")
+ }
+
+ evt := decoder.Event()
+ if evt.Type != "large" {
+ t.Errorf("Expected event type 'large', got '%s'", evt.Type)
+ }
+
+ expectedData := largeData + "\n"
+ if string(evt.Data) != expectedData {
+ t.Errorf("Data size mismatch: expected %d, got %d", len(expectedData), len(evt.Data))
+ }
+
+ if decoder.Next() {
+ t.Error("Expected Next() to return false at end of stream")
+ }
+
+ if err := decoder.Err(); err != nil {
+ t.Errorf("Expected no error, got %v", err)
+ }
+}
+
+func TestUnboundedDecoder_MultipleEvents(t *testing.T) {
+ data := "event: first\ndata: data1\n\nevent: second\ndata: data2\n\n"
+ rc := io.NopCloser(strings.NewReader(data))
+ decoder := NewUnboundedDecoder(rc)
+
+ // First event
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true for first event")
+ }
+ evt := decoder.Event()
+ if evt.Type != "first" {
+ t.Errorf("Expected event type 'first', got '%s'", evt.Type)
+ }
+ if string(evt.Data) != "data1\n" {
+ t.Errorf("Expected data 'data1\\n', got '%s'", string(evt.Data))
+ }
+
+ // Second event
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true for second event")
+ }
+ evt = decoder.Event()
+ if evt.Type != "second" {
+ t.Errorf("Expected event type 'second', got '%s'", evt.Type)
+ }
+ if string(evt.Data) != "data2\n" {
+ t.Errorf("Expected data 'data2\\n', got '%s'", string(evt.Data))
+ }
+
+ // No more events
+ if decoder.Next() {
+ t.Error("Expected Next() to return false at end of stream")
+ }
+
+ if err := decoder.Err(); err != nil {
+ t.Errorf("Expected no error, got %v", err)
+ }
+}
+
+func TestUnboundedDecoder_MultilineData(t *testing.T) {
+ data := "event: multiline\ndata: line1\ndata: line2\ndata: line3\n\n"
+ rc := io.NopCloser(strings.NewReader(data))
+ decoder := NewUnboundedDecoder(rc)
+
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true")
+ }
+
+ evt := decoder.Event()
+ if evt.Type != "multiline" {
+ t.Errorf("Expected event type 'multiline', got '%s'", evt.Type)
+ }
+
+ expectedData := "line1\nline2\nline3\n"
+ if string(evt.Data) != expectedData {
+ t.Errorf("Expected data '%s', got '%s'", expectedData, string(evt.Data))
+ }
+}
+
+func TestUnboundedDecoder_Comments(t *testing.T) {
+ data := ": this is a comment\nevent: test\n: another comment\ndata: hello\n\n"
+ rc := io.NopCloser(strings.NewReader(data))
+ decoder := NewUnboundedDecoder(rc)
+
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true")
+ }
+
+ evt := decoder.Event()
+ if evt.Type != "test" {
+ t.Errorf("Expected event type 'test', got '%s'", evt.Type)
+ }
+ if string(evt.Data) != "hello\n" {
+ t.Errorf("Expected data 'hello\\n', got '%s'", string(evt.Data))
+ }
+}
+
+func TestUnboundedDecoder_NoEventType(t *testing.T) {
+ data := "data: hello\n\n"
+ rc := io.NopCloser(strings.NewReader(data))
+ decoder := NewUnboundedDecoder(rc)
+
+ if !decoder.Next() {
+ t.Fatal("Expected Next() to return true")
+ }
+
+ evt := decoder.Event()
+ if evt.Type != "" {
+ t.Errorf("Expected empty event type, got '%s'", evt.Type)
+ }
+ if string(evt.Data) != "hello\n" {
+ t.Errorf("Expected data 'hello\\n', got '%s'", string(evt.Data))
+ }
+}
+
+func BenchmarkUnboundedDecoder_LargeEvent(b *testing.B) {
+ // Create a 10MB event for benchmarking
+ size := 10 * 1024 * 1024
+ largeData := strings.Repeat("x", size)
+
+ var buf bytes.Buffer
+ buf.WriteString("event: bench\n")
+ buf.WriteString("data: ")
+ buf.WriteString(largeData)
+ buf.WriteString("\n\n")
+
+ data := buf.Bytes()
+
+ b.ResetTimer()
+ b.SetBytes(int64(len(data)))
+
+ for i := 0; i < b.N; i++ {
+ rc := io.NopCloser(bytes.NewReader(data))
+ decoder := NewUnboundedDecoder(rc)
+
+ if !decoder.Next() {
+ b.Fatal("Expected Next() to return true")
+ }
+
+ _ = decoder.Event()
+ }
+}
diff --git a/packages/tui/internal/tui/tui.go b/packages/tui/internal/tui/tui.go
index 27944367..3a0bc373 100644
--- a/packages/tui/internal/tui/tui.go
+++ b/packages/tui/internal/tui/tui.go
@@ -656,12 +656,26 @@ func (a Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case opencode.EventListResponseEventSessionError:
switch err := msg.Properties.Error.AsUnion().(type) {
case nil:
+ // No error details provided
case opencode.ProviderAuthError:
slog.Error("Failed to authenticate with provider", "error", err.Data.Message)
return a, toast.NewErrorToast("Provider error: " + err.Data.Message)
case opencode.UnknownError:
slog.Error("Server error", "name", err.Name, "message", err.Data.Message)
return a, toast.NewErrorToast(err.Data.Message, toast.WithTitle(string(err.Name)))
+ case opencode.EventListResponseEventSessionErrorPropertiesErrorAPIError:
+ slog.Error("API error", "message", err.Data.Message, "statusCode", err.Data.StatusCode)
+ return a, toast.NewErrorToast(err.Data.Message, toast.WithTitle(string(err.Name)))
+ case opencode.MessageAbortedError:
+ // Message was aborted - this is expected when user cancels, so just log it
+ slog.Debug("Message aborted", "message", err.Data.Message)
+ case opencode.EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError:
+ slog.Error("Message output length error")
+ return a, toast.NewErrorToast("Message output length exceeded limit")
+ default:
+ // Handle any unhandled error types
+ slog.Error("Unhandled session error type", "type", fmt.Sprintf("%T", err))
+ return a, toast.NewErrorToast("An unexpected error occurred")
}
case opencode.EventListResponseEventSessionCompacted:
if msg.Properties.SessionID == a.app.Session.ID {
diff --git a/packages/ui/package.json b/packages/ui/package.json
index dcec177b..8fd6bff6 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/ui",
- "version": "0.15.28",
+ "version": "0.15.29",
"type": "module",
"exports": {
".": "./src/components/index.ts",
diff --git a/packages/web/package.json b/packages/web/package.json
index 0bd80e05..797bf3a6 100644
--- a/packages/web/package.json
+++ b/packages/web/package.json
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/web",
"type": "module",
- "version": "0.15.28",
+ "version": "0.15.29",
"scripts": {
"dev": "astro dev",
"dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev",
diff --git a/packages/web/src/content/docs/enterprise.mdx b/packages/web/src/content/docs/enterprise.mdx
index 0899d485..6bfc9b7a 100644
--- a/packages/web/src/content/docs/enterprise.mdx
+++ b/packages/web/src/content/docs/enterprise.mdx
@@ -1,15 +1,18 @@
---
title: Enterprise
-description: Using OpenCode in your organization.
+description: Using OpenCode securely in your organization.
---
import config from "../../../config.mjs"
export const email = `mailto:${config.email}`
-OpenCode does not store any of your code or context data. This makes it easy for
-you to use OpenCode at your organization.
+OpenCode Enterprise is for organizations that want to ensure that their code and data never leaves their infrastructure. It can do this by using a centralized config that integrates with your SSO and internal AI gateway.
-To get started, we recommend:
+:::note
+OpenCode does not store any of your code or context data.
+:::
+
+To get started with OpenCode Enterprise:
1. Do a trial internally with your team.
2. **Contact us ** to discuss pricing and implementation options.
@@ -18,13 +21,16 @@ To get started, we recommend:
## Trial
-Since OpenCode is open source and does not store any of your code or context data, your developers can simply [get started](/docs/) and carry out a trial.
+OpenCode is open source and does not store any of your code or context data, so your developers can simply [get started](/docs/) and carry out a trial.
---
### Data handling
-**opencode does not store your code or context data.** All processing happens locally or through direct API calls to your AI provider.
+**OpenCode does not store your code or context data.** All processing happens locally or through direct API calls to your AI provider.
+
+This means that as long as you are using a provider you trust, or an internal
+AI gateway, you can use OpenCode securely.
The only caveat here is the optional `/share` feature.
@@ -32,7 +38,7 @@ The only caveat here is the optional `/share` feature.
#### Sharing conversations
-If a user enables the `/share` feature, the conversation and the data associated with it are sent to the service we use to host these shares pages at opencode.ai.
+If a user enables the `/share` feature, the conversation and the data associated with it are sent to the service we use to host these share pages at opencode.ai.
The data is currently served through our CDN's edge network, and is cached on the edge near your users.
@@ -51,7 +57,54 @@ We recommend you disable this for your trial.
### Code ownership
-**You own all code produced by opencode.** There are no licensing restrictions or ownership claims.
+**You own all code produced by OpenCode.** There are no licensing restrictions or ownership claims.
+
+---
+
+## Pricing
+
+We use a per-seat model for OpenCode Enterprise. If you have your own LLM gateway, we do not charge for tokens used. For further details about pricing and implementation options, **contact us **.
+
+---
+
+## Deployment
+
+Once you have completed your trial and you are ready to use OpenCode at
+your organization, you can **contact us ** to discuss
+pricing and implementation options.
+
+---
+
+### Central Config
+
+We can set up OpenCode to use a single central config for your entire organization.
+
+This centralized config can integrate with your SSO provider and ensures all users access only your internal AI gateway.
+
+---
+
+### SSO integration
+
+Through the central config, OpenCode can integrate with your organization's SSO provider for authentication.
+
+This allows OpenCode to obtain credentials for your internal AI gateway through your existing identity management system.
+
+---
+
+### Internal AI gateway
+
+With the central config, OpenCode can also be configured to use only your internal AI gateway.
+
+You can also disable all other AI providers, ensuring all requests go through your organization's approved infrastructure.
+
+---
+
+### Self-hosting
+
+While we recommend disabling the share pages to ensure your data never leaves
+your organization, we can also help you self-host them on your infrastructure.
+
+This is currently on our roadmap. If you're interested, **let us know **.
---
@@ -60,59 +113,37 @@ We recommend you disable this for your trial.
What is OpenCode Enterprise?
-OpenCode Enterprise provides self-hosted deployment options with enhanced security, SSO integration, and dedicated support for organizations that need to maintain full control over their development environment.
+OpenCode Enterprise is for organizations that want to ensure that their code and data never leaves their infrastructure. It can do this by using a centralized config that integrates with your SSO and internal AI gateway.
+
+
+
+
+How do I get started with OpenCode Enterprise?
+
+Simply start with an internal trial with your team. OpenCode by default does not store your code or context data, making it easy to get started.
+
+Then **contact us ** to discuss pricing and implementation options.
How does enterprise pricing work?
-Enterprise pricing is based on team size and deployment requirements. Contact us at {config.email} for a custom quote based on your organization's needs.
+We offer per-seat enterprise pricing. If you have your own LLM gateway, we do not charge for tokens used. For further details, **contact us ** for a custom quote based on your organization's needs.
-What deployment options are available?
+Is my data secure with OpenCode Enterprise?
-We offer cloud-hosted, on-premises, and air-gapped deployment options. Each includes SSO integration, private package registry support, and customizable security configurations.
+Yes. OpenCode does not store your code or context data. All processing happens locally or through direct API calls to your AI provider. With central config and SSO integration, your data remains secure within your organization's infrastructure.
-Is my data secure with enterprise?
+Can we use our own private NPM registry?
-Yes. OpenCode does not store your code or context data. All processing happens locally or through direct API calls to your AI provider. Enterprise deployments add SSO protection and can be fully air-gapped for maximum security.
-
-
-
-
-Can we integrate with existing tools?
-
-Yes. OpenCode supports private npm registries, custom authentication providers, and can be integrated into your existing CI/CD pipelines and development workflows.
-
-
-
----
-
-## Deployment
-
-Once you have completed your trial and you are ready to self-host opencode at
-your organization, you can **contact us ** to discuss
-pricing and implementation options.
-
----
-
-### SSO
-
-SSO integration can be implemented for enterprise deployments after your trial.
-This will allow your team's session data and shared conversations to be protected
-by your enterprise's authentication system.
-
----
-
-### Private NPM
-
-opencode supports private npm registries through Bun's native `.npmrc` file support. If your organization uses a private registry, such as JFrog Artifactory, Nexus, or similar, ensure developers are authenticated before running opencode.
+OpenCode supports private npm registries through Bun's native `.npmrc` file support. If your organization uses a private registry, such as JFrog Artifactory, Nexus, or similar, ensure developers are authenticated before running OpenCode.
To set up authentication with your private registry:
@@ -120,11 +151,11 @@ To set up authentication with your private registry:
npm login --registry=https://your-company.jfrog.io/api/npm/npm-virtual/
```
-This creates `~/.npmrc` with authentication details. opencode will automatically
+This creates `~/.npmrc` with authentication details. OpenCode will automatically
pick this up.
:::caution
-You must be logged into the private registry before running opencode.
+You must be logged into the private registry before running OpenCode.
:::
Alternatively, you can manually configure a `.npmrc` file:
@@ -134,11 +165,6 @@ registry=https://your-company.jfrog.io/api/npm/npm-virtual/
//your-company.jfrog.io/api/npm/npm-virtual/:_authToken=${NPM_AUTH_TOKEN}
```
-Developers must be logged into the private registry before running opencode to ensure packages can be installed from your enterprise registry.
+Developers must be logged into the private registry before running OpenCode to ensure packages can be installed from your enterprise registry.
----
-
-### Self-hosting
-
-The share feature can be self-hosted and the share pages can be made accessible
-only after the user has been authenticated.
+
diff --git a/packages/web/src/content/docs/mcp-servers.mdx b/packages/web/src/content/docs/mcp-servers.mdx
index ab87449e..132537b0 100644
--- a/packages/web/src/content/docs/mcp-servers.mdx
+++ b/packages/web/src/content/docs/mcp-servers.mdx
@@ -45,12 +45,12 @@ with a unique name. You can refer to that MCP by name when prompting the LLM.
"mcp": {
"name-of-mcp-server": {
// ...
- "enabled": true
+ "enabled": true,
},
"name-of-other-mcp-server": {
// ...
- }
- }
+ },
+ },
}
```
@@ -72,10 +72,10 @@ Add local MCP servers using `type` to `"local"` within the MCP object.
"command": ["npx", "-y", "my-mcp-command"],
"enabled": true,
"environment": {
- "MY_ENV_VAR": "my_env_var_value"
- }
- }
- }
+ "MY_ENV_VAR": "my_env_var_value",
+ },
+ },
+ },
}
```
@@ -91,8 +91,8 @@ For example, here's how I can add the test
"mcp_everything": {
"type": "local",
"command": ["npx", "-y", "@modelcontextprotocol/server-everything"],
- }
- }
+ },
+ },
}
```
@@ -106,12 +106,13 @@ use the mcp_everything tool to add the number 3 and 4
Here are all the options for configuring a local MCP server.
-| Option | Type | Required | Description |
-| ------------- | ------- | -------- | ----------------------------------------------------- |
-| `type` | String | Y | Type of MCP server connection, must be `"local"`. |
-| `command` | Array | Y | Command and arguments to run the MCP server. |
-| `environment` | Object | | Environment variables to set when running the server. |
-| `enabled` | Boolean | | Enable or disable the MCP server on startup. |
+| Option | Type | Required | Description |
+| ------------- | ------- | -------- | ----------------------------------------------------------------------------------- |
+| `type` | String | Y | Type of MCP server connection, must be `"local"`. |
+| `command` | Array | Y | Command and arguments to run the MCP server. |
+| `environment` | Object | | Environment variables to set when running the server. |
+| `enabled` | Boolean | | Enable or disable the MCP server on startup. |
+| `timeout` | Number | | Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds). |
---
@@ -139,12 +140,13 @@ Here the `url` is the URL of the remote MCP server and with the `headers` option
#### Options
-| Option | Type | Required | Description |
-| --------- | ------- | -------- | -------------------------------------------------- |
-| `type` | String | Y | Type of MCP server connection, must be `"remote"`. |
-| `url` | String | Y | URL of the remote MCP server. |
-| `enabled` | Boolean | | Enable or disable the MCP server on startup. |
-| `headers` | Object | | Headers to send with the request. |
+| Option | Type | Required | Description |
+| --------- | ------- | -------- | ----------------------------------------------------------------------------------- |
+| `type` | String | Y | Type of MCP server connection, must be `"remote"`. |
+| `url` | String | Y | URL of the remote MCP server. |
+| `enabled` | Boolean | | Enable or disable the MCP server on startup. |
+| `headers` | Object | | Headers to send with the request. |
+| `timeout` | Number | | Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds). |
---
diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json
index bd671373..c65cb039 100644
--- a/sdks/vscode/package.json
+++ b/sdks/vscode/package.json
@@ -2,7 +2,7 @@
"name": "opencode",
"displayName": "opencode",
"description": "opencode for VS Code",
- "version": "0.15.28",
+ "version": "0.15.29",
"publisher": "sst-dev",
"repository": {
"type": "git",