OpenCode v1.4.0: SDK Refactor & OTLP Support

OpenCode v1.4.0 brings OTLP observability, HTTP proxy support, and breaking SDK changes to diff metadata and UserMessage structure. Update your code before upgrading.

OpenCode v1.4.0: SDK Refactor & OTLP Support

TL;DR

  • Diff metadata now uses unified patch format instead of full file contents — breaking change
  • UserMessage.variant moved to UserMessage.model.variant — update your SDK calls
  • OTLP observability export, HTTP proxy support, and TypeScript LSP memory fix

Breaking Changes

  • Diff metadata format — Edit and patch tool diffs no longer include to and from fields with full file contents. Now only patch field with unified diff. All snapshot diffs follow this format.
  • UserMessage.variant moved — Access via userMessage.model.variant instead of userMessage.variant.

New

  • OTLP observability export — Send telemetry to OpenTelemetry collectors for better observability.
  • HTTP proxy support — Full proxy configuration now available.
  • Model variant keybinding — TUI option to switch model variants via custom keybinding.
  • PDF drag and drop — Attach PDFs directly in TUI.
  • Auto-approve permissions flagopencode run --dangerously-skip-permissions auto-approves non-denied prompts.

Fixed

  • Web fetch timeouts — Failed fetches no longer leave stale timeouts behind.
  • TypeScript LSP memory leak — Native project config reduces memory use significantly.
  • Alibaba rate limits — Now retried instead of failing immediately.
  • OpenRouter provider issues — Resolved compatibility problems.
  • GitHub Copilot reasoning levels — Aligned Anthropic reasoning and removed incorrect Qwen variants.
  • Login error messages — Transport errors now clearer.

Desktop & TUI Improvements

  • Subagent sessions now have clearer titles, navigation, and progress states.
  • Auto-accept permissions moved to Settings.
  • Full file names displayed on attachment chips.

Update via: npm install opencode@latest or check the release page for platform-specific instructions.

Source: OpenCode