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