Copilot SDK v0.2.1-preview.0: Commands & Blob Attachments

Node.js gets commands and UI prompts, all SDKs gain custom model listing, and blob attachments let you send images without disk writes. Go has breaking enum and struct naming changes.

Copilot SDK v0.2.1-preview.0: Commands & Blob Attachments

TL;DR

  • Node.js SDK now supports slash commands and interactive UI prompts (confirm, select, text input)
  • All SDKs gain custom model listing via onListModels callback for BYOK setups
  • New blob attachment type for sending base64 image data without disk writes
  • Breaking changes in Go: enum naming convention and struct name updates

New

  • Commands and UI prompts for Node.js — Register slash commands and show interactive dialogs (confirm, select, text input) in sessions, bringing Node.js to feature parity with other SDKs.
  • Custom model listing callback — All SDKs now accept onListModels in client options, letting you override model discovery for BYOK scenarios where you control the provider.
  • Blob attachments — Send base64-encoded images directly to sessions without writing to disk first, useful for screenshots and in-memory generated content.
  • Skip permission prompts for safe tools — Tools can now set skipPermission: true to bypass per-use permission dialogs.

Fixed

  • Node.js CommonJS compatibility — SDK can now be require()d in VS Code extensions and other CommonJS contexts.
  • Node.js cliPath handlingcliPath is now properly ignored when cliUrl is already set.
  • C# SessionEvent serialization — Fixed ToJson() failing for events with JsonElement-backed members.
  • C# unknown session events — Unknown event types no longer throw; returned as UnknownSessionEvent preserving raw JSON.
  • C# AOT serialization crash — Fixed crash when CancellationToken fires during JSON-RPC operations.
  • Go enum naming — All enum constants now use TypeNameValue convention (e.g., SessionEventTypeSessionIdle).
  • Go struct naming — Removed Rpc suffix from struct names in the rpc package.
  • Go Session.SetModel signature — Now takes *SetModelOptions instead of variadic argument.
  • Python workspace_path flexibilityworkspace_path in CopilotSession now accepts any os.PathLike value.

Breaking Changes

  • Go enum constants — Update references from unprefixed names to the new TypeNameValue convention (e.g., SessionIdleSessionEventTypeSessionIdle).
  • Go struct names — Remove Rpc suffix from struct references in the rpc package.
  • Go Session.SetModel — Change variadic calls to pass *SetModelOptions pointer instead.
  • Python private modulestelemetry, jsonrpc, and sdk_protocol_version are now marked private; don't import directly.

Update via npm install @github/copilot-sdk@0.2.1-preview.0 (Node.js), or check your language's package manager for the latest version.

Source: Copilot SDK