Releases: github/copilot-sdk
Release list
v1.0.6-preview.1
Feature: experimental context attribution APIs
Two new experimental methods on session.metadata provide per-source token attribution for the session's context window. (#1886)
getContextAttribution() returns a flat list of attribution entries — skills, subagents, MCP servers, tools, plugins — each with a token count and hierarchical nesting via parentId. getContextHeaviestMessages() returns the largest individual messages currently in context, most-expensive first.
const attr = await session.metadata.getContextAttribution();
// attr.contextAttribution.entries → [{ kind: 'skill', id: 'skill:tmux', tokens: 1234, ... }, ...]
const heavy = await session.metadata.getContextHeaviestMessages({ limit: 10 });var attr = await session.Metadata.GetContextAttributionAsync();
var heavy = await session.Metadata.GetContextHeaviestMessagesAsync(limit: 10);Other changes
- feature:
SlashCommandInputnow supports an optionalchoicesfield, allowing slash commands to declare selectable literal options with human-facing descriptions (#1886) - feature:
ExternalToolTextResultForLlmnow supportstoolReferencesfor returning deferred tool names to the model from a tool-search override (#1886)
Generated by Release Changelog Generator · claude-sonnet-4.6
Generated by Release Changelog Generator · sonnet46 1.8M
rust/v1.0.6-preview.1
What's Changed
- Update @github/copilot to 1.0.68 by @github-actions[bot] in #1886
- Update Java JaCoCo coverage badge by @github-actions[bot] in #1833
- Remove Java JaCoCo badge auto-update pipeline by @brunoborges with @Copilot in #1826
- Update @github/copilot to 1.0.69-0 by @github-actions[bot] in #1892
Full Changelog: rust/v1.0.6-preview.0...rust/v1.0.6-preview.1
GitHub Copilot SDK for Java 1.0.6-preview.1
Installation
vMaj.Min.Micro. For example v0.1.32. The corresponding maven version for the release will be Maj.Min.Micro-java.N, where Maj, Min and Micro are the corresponding numbers for the reference implementation release, and N is a monotonically increasing sequence number starting with 0 for each release. See the corresponding architectural decision record for more information in the docs/adr directory of the source code.
📦 [View on Maven Central]((central.sonatype.com/redacted)
📖 [Documentation]((github.github.io/redacted) · [Javadoc]((github.github.io/redacted)
Maven
<dependency>
<groupId>com.github</groupId>
<artifactId>copilot-sdk-java</artifactId>
<version>1.0.6-preview.1</version>
</dependency>Gradle (Kotlin DSL)
implementation("com.github:copilot-sdk-java:1.0.6-preview.1")Gradle (Groovy DSL)
implementation 'com.github:copilot-sdk-java:1.0.6-preview.1'Feature: experimental GitHub telemetry forwarding
The Java SDK now supports forwarding per-session GitHub telemetry events to your application. Set onGitHubTelemetry on CopilotClientOptions to receive gitHubTelemetry.event notifications from the runtime; the client automatically opts every session it creates or resumes into telemetry forwarding when the handler is present. (#1835)
CopilotClientOptions options = new CopilotClientOptions()
.setOnGitHubTelemetry(notification -> {
// process per-session GitHub telemetry event
return CompletableFuture.completedFuture(null);
});Note: This is an experimental feature (
@CopilotExperimental) and may change or be removed without notice.
Generated by Release Changelog Generator · sonnet46 977.2K
v1.0.6-preview.0
Feature: experimental GitHub telemetry redirection
All SDKs now support an optional onGitHubTelemetry callback in ClientOptions that lets hosts receive per-session GitHub telemetry events forwarded by the runtime. When a handler is registered, the client automatically opts sessions in via enableGitHubTelemetryRedirection and dispatches each incoming gitHubTelemetry.event notification to the callback. This feature is experimental, intentionally hidden from public IDE completion in C# ([EditorBrowsable(Never)]) and Rust (#[doc(hidden)]). (#1835)
const client = new CopilotClient({
onGitHubTelemetry: (notification) => { /* handle telemetry event */ },
});var client = new CopilotClient(new CopilotClientOptions
{
OnGitHubTelemetry = (notification) => { /* handle telemetry event */ return Task.CompletedTask; },
});Generated by Release Changelog Generator · sonnet46 1.2M
v1.0.5
Feature: MCP OAuth host token handlers
SDK applications can now handle OAuth challenges from MCP servers that require host-provided authentication. Register an onMcpAuthRequest callback on the session config and the SDK will invoke it whenever an MCP server responds with a 401 WWW-Authenticate challenge; return an access token (or cancel the request). Supports initial auth, refresh, reauth, and upscope flows across all SDKs. (#1669)
const session = await client.createSession({
onMcpAuthRequest: async (request) => ({
accessToken: await myIdentityProvider.getToken(request.serverUrl),
}),
});var session = await client.CreateSessionAsync(new SessionConfig
{
OnMcpAuthRequest = async ctx =>
McpAuthResult.FromToken(new McpAuthToken
{
AccessToken = await myIdentityProvider.GetTokenAsync(ctx.ServerUrl)
}),
});Feature: session options for citations, excluded agents, and spending limits
Three additional session configuration options are now available across all SDKs. (#1865)
const session = await client.createSession({
enableCitations: true,
excludedBuiltinAgents: ["github-search"],
sessionLimits: { maxAiCredits: 10 },
});var session = await client.CreateSessionAsync(new SessionConfig
{
EnableCitations = true,
ExcludedBuiltInAgents = ["github-search"],
SessionLimits = new SessionLimitsConfig { MaxAiCredits = 10 },
});Other changes
- improvement: [All SDKs] rename BYOK callback field
getBearerToken→bearerTokenProvider; addsessionIdtoProviderTokenArgsfor per-session token scoping (#1796) - bugfix: [Node] fix MCP OAuth
registerInterestsent beforesession.resume, causing "Session not found" errors when resuming a session withonMcpAuthRequest(#1861) - feature: [Java]
@CopilotTooland@CopilotToolParamannotations with compile-time annotation processor for ergonomic tool registration viaToolDefinition.fromObject()(#1792, #1838) - feature: [Java]
ToolInvocationparameter injection in@CopilotToolmethods for accessing session context without exposing it to the LLM schema (#1832) - feature: [Rust] add 9 GitHub-anchored variants to
Attachmentenum (GitHubCommit,GitHubRelease,GitHubActionsJob,GitHubRepository,GitHubFileDiff,GitHubTreeComparison,GitHubUrl,GitHubFile,GitHubSnippet) (#1823)
New contributors
@pallaviraiturkar0made their first contribution in #1823@rojimade their first contribution in #1827@coleflennikenmsftmade their first contribution in #1854@szabta89made their first contribution in #1856
Full Changelog: v1.0.4...v1.0.5
Generated by Release Changelog Generator · sonnet46 2.6M
rust/v1.0.5
What's Changed
- Update @github/copilot to 1.0.66 by @github-actions[bot] in #1859
- Update @github/copilot to 1.0.67 by @github-actions[bot] in #1860
- Expose new session options across SDKs by @stephentoub in #1865
- Fix MCP OAuth resume order in Node.js SDK by @MackinnonBuck in #1861
- docs: update billing information for GitHub Copilot SDK usage by @coleflennikenmsft in #1854
- docs: add session limits guidance by @szabta89 in #1856
New Contributors
- @coleflennikenmsft made their first contribution in #1854
- @szabta89 made their first contribution in #1856
Full Changelog: rust/v1.0.5-preview.1...rust/v1.0.5
GitHub Copilot SDK for Java 1.0.5-01
Installation
vMaj.Min.Micro. For example v0.1.32. The corresponding maven version for the release will be Maj.Min.Micro-java.N, where Maj, Min and Micro are the corresponding numbers for the reference implementation release, and N is a monotonically increasing sequence number starting with 0 for each release. See the corresponding architectural decision record for more information in the docs/adr directory of the source code.
📦 [View on Maven Central]((central.sonatype.com/redacted)
📖 [Documentation]((github.github.io/redacted) · [Javadoc]((github.github.io/redacted)
Maven
<dependency>
<groupId>com.github</groupId>
<artifactId>copilot-sdk-java</artifactId>
<version>1.0.5-01</version>
</dependency>Gradle (Kotlin DSL)
implementation("com.github:copilot-sdk-java:1.0.5-01")Gradle (Groovy DSL)
implementation 'com.github:copilot-sdk-java:1.0.5-01'Feature: new session options — citations, agent exclusions, and credit limits
Three new options are available on SessionConfig and ResumeSessionConfig. enableCitations (experimental) enables native model citations for supported providers; excludedBuiltInAgents hides named built-in agents from discovery; and sessionLimits sets a per-session AI-credit budget. (#1865)
SessionConfig config = new SessionConfig()
.setEnableCitations(true)
.setExcludedBuiltInAgents(List.of("copilot"))
.setSessionLimits(new SessionLimitsConfig(100.0));New contributors
@coleflennikenmsftmade their first contribution in #1854@szabta89made their first contribution in #1856
Generated by Release Changelog Generator · sonnet46 1.7M
rust/v1.0.6-preview.0
What's Changed
- Update @github/copilot to 1.0.66 by @github-actions[bot] in #1859
- Update @github/copilot to 1.0.67 by @github-actions[bot] in #1860
- Expose new session options across SDKs by @stephentoub in #1865
- Fix MCP OAuth resume order in Node.js SDK by @MackinnonBuck in #1861
- docs: update billing information for GitHub Copilot SDK usage by @coleflennikenmsft in #1854
- docs: add session limits guidance by @szabta89 in #1856
- Stream Anthropic /messages responses in E2E fake handlers by @stephentoub in #1868
- [changelog] Add changelog for java/v1.0.5-01 by @github-actions[bot] in #1871
- [changelog] Add changelog for v1.0.5 by @github-actions[bot] in #1869
- Add experimental GitHub telemetry redirection across all SDKs by @MackinnonBuck in #1835
New Contributors
- @coleflennikenmsft made their first contribution in #1854
- @szabta89 made their first contribution in #1856
Full Changelog: rust/v1.0.5-preview.1...rust/v1.0.6-preview.0
v1.0.5-preview.1
Feature: MCP OAuth host token callbacks
When a Copilot session connects to an OAuth-protected MCP server, the SDK now calls back to your application to supply OAuth tokens. Register an onMcpAuthRequest handler in the session config to provide tokens or cancel the request. (#1669)
const session = await client.startSession({
onMcpAuthRequest: async (request) => {
const token = await myOAuthFlow(request.serverUrl, request.reason);
return token ? { kind: "token", accessToken: token } : { kind: "cancelled" };
},
});var session = await client.StartSessionAsync(new SessionConfig
{
OnMcpAuthRequest = async (ctx) =>
{
var token = await MyOAuthFlow(ctx.ServerUrl, ctx.Reason);
return token is not null
? McpAuthResult.FromToken(new McpAuthToken { AccessToken = token })
: McpAuthResult.Cancel();
},
});Feature: sessionId in BYOK bearer-token callback; field renamed to bearerTokenProvider
The BYOK config field has been renamed from getBearerToken to bearerTokenProvider across all SDKs. The callback now also receives a sessionId, so a single callback shared across multiple sessions can scope token acquisition or caching per session. (#1796)
const client = new CopilotClient({
provider: {
bearerTokenProvider: async ({ providerName, sessionId }) => {
return await getTokenForSession(sessionId);
},
},
});var client = new CopilotClient(new CopilotClientConfig
{
Provider = new ProviderConfig
{
BearerTokenProvider = async (args) => await GetTokenForSession(args.SessionId),
},
});Feature: Java @CopilotTool annotation-based tool definition
Java applications can now define Copilot tools by annotating methods with @CopilotTool and @CopilotToolParam instead of building ToolDefinition objects manually. A compile-time annotation processor generates the metadata, and ToolDefinition.fromObject() registers all annotated methods at once. (#1792)
`@CopilotTool`("Get the current weather for a given city")
public String getWeather(
`@CopilotToolParam`(value = "The city", required = true) String city,
`@CopilotToolParam`(value = "Unit: celsius or fahrenheit", defaultValue = "celsius") String unit) {
return fetchWeather(city, unit);
}List<ToolDefinition> tools = ToolDefinition.fromObject(new WeatherTools());Other changes
- feature: [Java]
@CopilotToolmethods can declareToolInvocationas a hidden injected parameter to access runtime context such assessionId(#1832) - feature: [Java] rename
@Paramannotation to@CopilotToolParam(#1838) - feature: [Rust] add 9 GitHub-anchored variants to the
Attachmentenum (GitHubCommit,GitHubRelease,GitHubActionsJob,GitHubRepository,GitHubFileDiff,GitHubTreeComparison,GitHubUrl,GitHubFile,GitHubSnippet) (#1823)
New contributors
@pallaviraiturkar0made their first contribution in #1823@rojimade their first contribution in #1827
Generated by Release Changelog Generator · sonnet46 1.5M
rust/v1.0.5-preview.1
What's Changed
- Fix flaky C# permission E2E assertions by @roji in #1827
- Update @github/copilot to 1.0.66-2 by @github-actions[bot] in #1828
- [Java] Support hidden
ToolInvocationinjection in@CopilotToolmethods by @edburns with @Copilot in #1832 - Rename
Paramannotation toCopilotToolParamin Java SDK by @edburns with @Copilot in #1838 - Add SDK MCP OAuth host token handlers by @roji in #1669
New Contributors
Full Changelog: rust/v1.0.5-preview.0...rust/v1.0.5-preview.1