v0.2.1-preview.0
Pre-releaseFeature: commands and UI elicitation support for Node.js
The Node.js SDK now supports registering slash commands and prompting users with interactive dialogs. Pass commands in session config to handle CLI slash commands; use session.ui to show confirm, select, or text-input prompts. The feature was already available in other SDKs. (#906)
const session = await client.createSession({
commands: [{
name: "deploy",
handler: async (params) => ({ text: `Deploying to \$\{params.args}...` })
}]
});
const confirmed = await session.ui.confirm({ title: "Proceed?", message: "This will deploy to production." });
const env = await session.ui.select({ title: "Environment", options: [{ value: "prod" }, { value: "staging" }] });
const note = await session.ui.input({ title: "Release note" });Feature: custom model listing for BYOK mode
All four SDKs now accept an onListModels callback in client options. When provided, client.listModels() calls your handler instead of querying the CLI — useful for BYOK setups where you want to expose your provider's available models. (#730)
const client = new CopilotClient({
onListModels: async () => [{ id: "gpt-4o", displayName: "GPT-4o", vendor: "OpenAI" }]
});var client = new CopilotClient(new CopilotClientOptions {
OnListModels = async (ct) => [new ModelInfo { Id = "gpt-4o", DisplayName = "GPT-4o" }]
});- Python:
on_list_models=lambda: [ModelInfo(id="gpt-4o", display_name="GPT-4o")] - Go:
OnListModels: func(ctx context.Context) ([]copilot.ModelInfo, error) { ... }
Feature: blob attachments for inline image data
A new blob attachment type lets you send base64-encoded content directly to a session without writing it to disk first — useful when images are already in memory (screenshots, API responses, generated images). (#731)
await session.sendMessage("Describe this screenshot", {
attachments: [{ type: "blob", data: base64Data, mimeType: "image/png", displayName: "screen.png" }]
});await session.send_message("Describe this screenshot", attachments=[
BlobAttachment(type="blob", data=base64_data, mime_type="image/png", display_name="screen.png")
])Other changes
- feature: [All] tools can now set
skipPermission: trueto bypass per-use permission prompts for safe tools (#808) - bugfix: [Node] add CJS compatibility so the SDK can be
require()d in VS Code extensions and other CommonJS contexts (#546) - bugfix: [Node]
cliPathis now ignored whencliUrlis already set (#787) - bugfix: [C#] fix
SessionEvent.ToJson()failing for events withJsonElement-backed members (e.g.tool.execution_start,session.shutdown) (#868) - bugfix: [C#] unknown session event types no longer throw; they are returned as
UnknownSessionEventpreserving the raw JSON (#881) - bugfix: [C#] fix AOT serialization crash when a
CancellationTokenfires during a JSON-RPC operation (#783) - improvement: [C#] optional RPC parameters are now optional method parameters, preventing source-breaking changes when new optional params are added by the runtime (#733)
- bugfix: [Go] all enum constants are now consistently named using the
TypeNameValueconvention (e.g.SessionEventTypeSessionIdle,ModeInteractive) — breaking change: update any references using the old unprefixed names (#883) - improvement: [Go]
Rpcsuffix removed from struct names in therpcpackage (e.g.ModelRpcApi→ModelApi) (#905) - bugfix: [Go]
Session.SetModelnow takes*SetModelOptionsinstead of a variadic argument (#904) - bugfix: [Python]
workspace_pathinCopilotSessionnow accepts anyos.PathLikevalue, not just strings (#901) - improvement: [Python]
telemetry,jsonrpc, andsdk_protocol_versionmodules are now marked as private (#884)
New contributors
@darthmolenmade their first contribution in #546@MackinnonBuckmade their first contribution in #731@kirankashyapmade their first contribution in #740@PureWeenmade their first contribution in #783@stefansedichmade their first contribution in #784@sergiou87made their first contribution in #787@MRayermannMSFTmade their first contribution in #808@xoofxmade their first contribution in #868@jamesmontemagnomade their first contribution in #879@Ron537made their first contribution in #881@edburnsmade their first contribution in #889
Generated by Release Changelog Generator