,
@@ -13149,6 +13155,28 @@ pub enum CopilotApiTokenAuthInfoType {
CopilotApiToken,
}
+/// Context tier currently pinned for the session, when one is set. Reflects `Session.getContextTier()`, restored from the session journal on resume.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum ModelCurrentContextTier {
+ /// Use the model's default context window.
+ #[serde(rename = "default")]
+ Default,
+ /// Pin the session to the long-context tier when supported.
+ #[serde(rename = "long_context")]
+ LongContext,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// Server transport type: stdio, http, sse (deprecated), or memory
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum DiscoveredMcpServerType {
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs
index 25726978e..422bf7b83 100644
--- a/rust/src/generated/rpc.rs
+++ b/rust/src/generated/rpc.rs
@@ -3468,7 +3468,7 @@ impl<'a> SessionRpcModel<'a> {
///
/// # Returns
///
- /// The currently selected model and reasoning effort for the session.
+ /// The currently selected model, reasoning effort, and context tier for the session.
///
///
///
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index 621f6c737..818e62bf0 100644
--- a/test/harness/package-lock.json
+++ b/test/harness/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
- "@github/copilot": "^1.0.56-1",
+ "@github/copilot": "^1.0.56-2",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -464,9 +464,9 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.56-1.tgz",
- "integrity": "sha512-9VGwX6kcUfm8NHTQaUEtmR6qA73jyDXwtBSmd8ia3OpadEpqc5V65isv37zEtGDv33PPA4ntvoEG0CK4j2oXEg==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.56-2.tgz",
+ "integrity": "sha512-Dpue7utF6PzGS4tPrG3pRXL3d1lMJHFFT8PJegljn7vg64LAbjhk5yNgBXbMg/XbObu755SJTNtbEL/aSdrGNg==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
@@ -476,20 +476,20 @@
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.56-1",
- "@github/copilot-darwin-x64": "1.0.56-1",
- "@github/copilot-linux-arm64": "1.0.56-1",
- "@github/copilot-linux-x64": "1.0.56-1",
- "@github/copilot-linuxmusl-arm64": "1.0.56-1",
- "@github/copilot-linuxmusl-x64": "1.0.56-1",
- "@github/copilot-win32-arm64": "1.0.56-1",
- "@github/copilot-win32-x64": "1.0.56-1"
+ "@github/copilot-darwin-arm64": "1.0.56-2",
+ "@github/copilot-darwin-x64": "1.0.56-2",
+ "@github/copilot-linux-arm64": "1.0.56-2",
+ "@github/copilot-linux-x64": "1.0.56-2",
+ "@github/copilot-linuxmusl-arm64": "1.0.56-2",
+ "@github/copilot-linuxmusl-x64": "1.0.56-2",
+ "@github/copilot-win32-arm64": "1.0.56-2",
+ "@github/copilot-win32-x64": "1.0.56-2"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.56-1.tgz",
- "integrity": "sha512-GmdinjTXPKe7CBGC6pfFEOcqE3cN7craTo4muMPIRzDWnnkPwkIT05z74fgLc+r0/+MtllCysXkQVLixHEmyQw==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.56-2.tgz",
+ "integrity": "sha512-RHJNhdPSkdPc/nabWVess7BfEda7xfwBQ2X5vq9nq4VjqTbvUHBFwTt792q00TE4DZR/UsWr0sJKJkLcRvTltQ==",
"cpu": [
"arm64"
],
@@ -504,9 +504,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.56-1.tgz",
- "integrity": "sha512-WfkSnB0MxmMxV58yqF8O0GkBzXCCKy3H6s13Xrqfvotmk9KNriVzCHmUnnMTve4XeOGCGrOqU2Hy2VNUu8Cj1A==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.56-2.tgz",
+ "integrity": "sha512-EqBtGH1I2rX5TzSJ+L9O22SQ8jlSsn1YJeFS6RTtYU+NhC6xLajjfTutkA5DZOr3eQgmeceit/4NDqEdjwANEA==",
"cpu": [
"x64"
],
@@ -521,9 +521,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.56-1.tgz",
- "integrity": "sha512-fNwcdnPG8N01n9MFl4xKswFsO4ZjkckM5D7UqgtO4aiJYGQYmw+Viq0MFzKD4G8Nzl5k6qR1pDnvWciVAcYDag==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.56-2.tgz",
+ "integrity": "sha512-FmjODKft2tmY5B0B94RDek/TR3QtdDTT7W/+lqkiosnUyLhsNtmzKaDYpiQsCBee68YUuB1umecqiTL1qMo3cw==",
"cpu": [
"arm64"
],
@@ -538,9 +538,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.56-1.tgz",
- "integrity": "sha512-Ow2dQSpuJXHmnw4RBitt/RiAMxsG9Mu5x0MX7ueNzhK1xfuGp7m8yUikbJNZQbBq2KZB2OlwGDKx2KtEBxtbig==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.56-2.tgz",
+ "integrity": "sha512-aqF4k6mDLU1OXdaAb3gBIRCgdrlXX+1FBtcoLKPMjzVfkA2abEZ/vuYfZWS7ZaxG/aCOScp8D+/E+RaYHsGYOw==",
"cpu": [
"x64"
],
@@ -555,9 +555,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.56-1.tgz",
- "integrity": "sha512-vZQAF+QCa+UVND6NNo/lexc3bLWLYMP63aY5peh5BIYrPLv0Ylf5+VSJoaxBC1qFrjLmFaKo4KRWtmh8Mqx6Lw==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.56-2.tgz",
+ "integrity": "sha512-+CztOiU7/nlNLX50jcpOMreMrDr7+DFnq3OV59doDd9UgqTdpjEnZKjkgHpxid117rYF/95cN5EYWD7ermOcjA==",
"cpu": [
"arm64"
],
@@ -572,9 +572,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.56-1.tgz",
- "integrity": "sha512-EEubP5DRWX/w2CPuZr7aQdfd57mGQ8gDNXOLNds+94Qp2UQD0/wJxF+FrU9YZSWPhcjG/BmXxnw/D7xwby53Nw==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.56-2.tgz",
+ "integrity": "sha512-FuBYfN2dX2a5fSEzPImtX6hjtjwiL0kutrq4RuvHYxUu0FR0JRB4vfN2mQ/KN4X5DZgaGkPQk19hkoEgd1tmdg==",
"cpu": [
"x64"
],
@@ -589,9 +589,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.56-1.tgz",
- "integrity": "sha512-PHr9xxlbh/UMYP0XL7UnPhgPdQyGbA6lJ7yqxoy0JO017c9o62Bhcd39gCuVPlkYurxeFzAdPnlbDVxSKBfNKQ==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.56-2.tgz",
+ "integrity": "sha512-mKTzS9HrH+wvOmIgIaRUs+l89o51P7ACVk4P/o1UEWGxDblTxwRZGL+cRBhqNltIxY+8XVIAEwg6CzE+sTH5Hw==",
"cpu": [
"arm64"
],
@@ -606,9 +606,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.56-1",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.56-1.tgz",
- "integrity": "sha512-EWMfn0EQhUYOpwG+VaLif9ZLBt3D9mZ0DFmxVSM2DSnIMRlpC23hAnwY9n1R6zAvwQY20XMLIJ4d0LW4mUX9Ag==",
+ "version": "1.0.56-2",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.56-2.tgz",
+ "integrity": "sha512-tacHeeqNiLawmlUpturke10I9d6kkREqTcHGkGRy/MEwrio7A77L45j/IegRcQNjLwHP62R2+5GmNFx6BRwx9w==",
"cpu": [
"x64"
],
diff --git a/test/harness/package.json b/test/harness/package.json
index 9c7f5344a..fd605ead4 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -11,7 +11,7 @@
"test": "vitest run"
},
"devDependencies": {
- "@github/copilot": "^1.0.56-1",
+ "@github/copilot": "^1.0.56-2",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
From c450bc9b7ee324fff1be1aefb3d1717e86b42c99 Mon Sep 17 00:00:00 2001
From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Date: Fri, 29 May 2026 11:42:41 -0700
Subject: [PATCH 2/4] Added context tier property
---
dotnet/src/Client.cs | 4 ++++
dotnet/src/Types.cs | 7 +++++++
go/client.go | 2 ++
go/types.go | 8 ++++++++
nodejs/src/client.ts | 2 ++
nodejs/src/types.ts | 12 ++++++++++++
python/copilot/client.py | 11 +++++++++++
python/copilot/session.py | 1 +
rust/src/types.rs | 25 +++++++++++++++++++++++++
rust/src/wire.rs | 4 ++++
10 files changed, 76 insertions(+)
diff --git a/dotnet/src/Client.cs b/dotnet/src/Client.cs
index 03f43c9a2..48644f04f 100644
--- a/dotnet/src/Client.cs
+++ b/dotnet/src/Client.cs
@@ -889,6 +889,7 @@ public async Task CreateSessionAsync(SessionConfig config, Cance
config.ClientName,
config.ReasoningEffort,
config.ReasoningSummary,
+ config.ContextTier,
config.Tools?.Select(ToolDefinition.FromAIFunction).ToList(),
wireSystemMessage,
toolFilter.AvailableTools,
@@ -1082,6 +1083,7 @@ public async Task ResumeSessionAsync(string sessionId, ResumeSes
config.Model,
config.ReasoningEffort,
config.ReasoningSummary,
+ config.ContextTier,
config.Tools?.Select(ToolDefinition.FromAIFunction).ToList(),
wireSystemMessage,
toolFilter.AvailableTools,
@@ -2272,6 +2274,7 @@ internal record CreateSessionRequest(
string? ClientName,
string? ReasoningEffort,
ReasoningSummary? ReasoningSummary,
+ string? ContextTier,
IList? Tools,
SystemMessageConfig? SystemMessage,
IList? AvailableTools,
@@ -2356,6 +2359,7 @@ internal record ResumeSessionRequest(
string? Model,
string? ReasoningEffort,
ReasoningSummary? ReasoningSummary,
+ string? ContextTier,
IList? Tools,
SystemMessageConfig? SystemMessage,
IList? AvailableTools,
diff --git a/dotnet/src/Types.cs b/dotnet/src/Types.cs
index 2e1a217b3..d3c2b3322 100644
--- a/dotnet/src/Types.cs
+++ b/dotnet/src/Types.cs
@@ -2452,6 +2452,7 @@ protected SessionConfigBase(SessionConfigBase? other)
ManageScheduleEnabled = other.ManageScheduleEnabled;
ReasoningEffort = other.ReasoningEffort;
ReasoningSummary = other.ReasoningSummary;
+ ContextTier = other.ContextTier;
CreateSessionFsProvider = other.CreateSessionFsProvider;
GitHubToken = other.GitHubToken;
RemoteSession = other.RemoteSession;
@@ -2493,6 +2494,12 @@ protected SessionConfigBase(SessionConfigBase? other)
///
public ReasoningSummary? ReasoningSummary { get; set; }
+ ///
+ /// Context window tier for models that support it.
+ /// Valid values: "default", "long_context".
+ ///
+ public string? ContextTier { get; set; }
+
/// Per-property overrides for model capabilities, deep-merged over runtime defaults.
public ModelCapabilitiesOverride? ModelCapabilities { get; set; }
diff --git a/go/client.go b/go/client.go
index 11c7e6234..cfdd25adc 100644
--- a/go/client.go
+++ b/go/client.go
@@ -605,6 +605,7 @@ func (c *Client) CreateSession(ctx context.Context, config *SessionConfig) (*Ses
req.ClientName = config.ClientName
req.ReasoningEffort = config.ReasoningEffort
req.ReasoningSummary = config.ReasoningSummary
+ req.ContextTier = config.ContextTier
req.ConfigDir = config.ConfigDirectory
if config.EnableConfigDiscovery {
req.EnableConfigDiscovery = Bool(true)
@@ -916,6 +917,7 @@ func (c *Client) ResumeSessionWithOptions(ctx context.Context, sessionID string,
req.Model = config.Model
req.ReasoningEffort = config.ReasoningEffort
req.ReasoningSummary = config.ReasoningSummary
+ req.ContextTier = config.ContextTier
systemMessage := c.systemMessageForMode(config.SystemMessage)
wireSystemMessage, transformCallbacks := extractTransformCallbacks(systemMessage)
req.SystemMessage = wireSystemMessage
diff --git a/go/types.go b/go/types.go
index 30216adf0..9663e5326 100644
--- a/go/types.go
+++ b/go/types.go
@@ -894,6 +894,9 @@ type SessionConfig struct {
// ReasoningSummary mode for models that support configurable reasoning summaries.
// Use ReasoningSummaryNone to suppress summary output regardless of whether reasoning is enabled.
ReasoningSummary ReasoningSummary
+ // ContextTier pins the session to a context window tier for models that support it.
+ // Valid values: "default", "long_context".
+ ContextTier string
// ConfigDirectory overrides the default configuration directory location.
// When specified, the session will use this directory for storing config and state.
ConfigDirectory string
@@ -1288,6 +1291,9 @@ type ResumeSessionConfig struct {
// ReasoningSummary mode for models that support configurable reasoning summaries.
// Use ReasoningSummaryNone to suppress summary output regardless of whether reasoning is enabled.
ReasoningSummary ReasoningSummary
+ // ContextTier pins the session to a context window tier for models that support it.
+ // Valid values: "default", "long_context".
+ ContextTier string
// OnPermissionRequest is an optional handler for permission requests from the server.
// When nil, permission requests are surfaced as events and left pending for the
// consumer to resolve via pending permission RPCs.
@@ -1645,6 +1651,7 @@ type createSessionRequest struct {
ClientName string `json:"clientName,omitempty"`
ReasoningEffort string `json:"reasoningEffort,omitempty"`
ReasoningSummary ReasoningSummary `json:"reasoningSummary,omitempty"`
+ ContextTier string `json:"contextTier,omitempty"`
Tools []Tool `json:"tools,omitempty"`
SystemMessage *SystemMessageConfig `json:"systemMessage,omitempty"`
AvailableTools []string `json:"availableTools"`
@@ -1721,6 +1728,7 @@ type resumeSessionRequest struct {
Model string `json:"model,omitempty"`
ReasoningEffort string `json:"reasoningEffort,omitempty"`
ReasoningSummary ReasoningSummary `json:"reasoningSummary,omitempty"`
+ ContextTier string `json:"contextTier,omitempty"`
Tools []Tool `json:"tools,omitempty"`
SystemMessage *SystemMessageConfig `json:"systemMessage,omitempty"`
AvailableTools []string `json:"availableTools"`
diff --git a/nodejs/src/client.ts b/nodejs/src/client.ts
index 5ee36b78b..46596416a 100644
--- a/nodejs/src/client.ts
+++ b/nodejs/src/client.ts
@@ -1100,6 +1100,7 @@ export class CopilotClient {
clientName: config.clientName,
reasoningEffort: config.reasoningEffort,
reasoningSummary: config.reasoningSummary,
+ contextTier: config.contextTier,
tools: config.tools?.map((tool) => ({
name: tool.name,
description: tool.description,
@@ -1279,6 +1280,7 @@ export class CopilotClient {
model: config.model,
reasoningEffort: config.reasoningEffort,
reasoningSummary: config.reasoningSummary,
+ contextTier: config.contextTier,
systemMessage: wireSystemMessage,
availableTools: toolFilterOptions.availableTools,
excludedTools: toolFilterOptions.excludedTools,
diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts
index b6ce9b774..da9af4ed8 100644
--- a/nodejs/src/types.ts
+++ b/nodejs/src/types.ts
@@ -1540,6 +1540,12 @@ export interface LargeToolOutputConfig {
*/
export type ReasoningEffort = "low" | "medium" | "high" | "xhigh";
+/**
+ * Context window tier for the session. "long_context" pins the session to the
+ * long-context tier when the selected model supports it.
+ */
+export type ContextTier = "default" | "long_context";
+
/**
* Stable extension identity for session participants that provide canvases.
*/
@@ -1580,6 +1586,12 @@ export interface SessionConfigBase {
*/
reasoningSummary?: ReasoningSummary;
+ /**
+ * Context window tier for models that support it. Use "long_context" to pin
+ * the session to the long-context tier; omit or use "default" otherwise.
+ */
+ contextTier?: ContextTier;
+
/** Per-property overrides for model capabilities, deep-merged over runtime defaults. */
modelCapabilities?: ModelCapabilitiesOverride;
diff --git a/python/copilot/client.py b/python/copilot/client.py
index 66c56a595..d25dd514e 100644
--- a/python/copilot/client.py
+++ b/python/copilot/client.py
@@ -77,6 +77,7 @@
from .session import (
AutoModeSwitchHandler,
CommandDefinition,
+ ContextTier,
CopilotSession,
CreateSessionFsHandler,
CustomAgentConfig,
@@ -1562,6 +1563,7 @@ async def create_session(
client_name: str | None = None,
reasoning_effort: ReasoningEffort | None = None,
reasoning_summary: ReasoningSummary | None = None,
+ context_tier: ContextTier | None = None,
tools: list[Tool] | None = None,
system_message: SystemMessageConfig | None = None,
available_tools: list[str] | ToolSet | None = None,
@@ -1633,6 +1635,8 @@ async def create_session(
reasoning_summary: Reasoning summary mode for supported models.
Use ``"none"`` to suppress summary output regardless of whether
reasoning is enabled.
+ context_tier: Context window tier for models that support it. Use
+ ``"long_context"`` to pin the session to the long-context tier.
tools: Custom tools to register with the session.
system_message: System message configuration.
available_tools: Allowlist of tools to enable. When specified, only
@@ -1779,6 +1783,8 @@ async def create_session(
payload["reasoningEffort"] = reasoning_effort
if reasoning_summary:
payload["reasoningSummary"] = reasoning_summary
+ if context_tier:
+ payload["contextTier"] = context_tier
if tool_defs:
payload["tools"] = tool_defs
@@ -2123,6 +2129,7 @@ async def resume_session(
client_name: str | None = None,
reasoning_effort: ReasoningEffort | None = None,
reasoning_summary: ReasoningSummary | None = None,
+ context_tier: ContextTier | None = None,
tools: list[Tool] | None = None,
system_message: SystemMessageConfig | None = None,
available_tools: list[str] | ToolSet | None = None,
@@ -2195,6 +2202,8 @@ async def resume_session(
reasoning_summary: Reasoning summary mode for supported models.
Use ``"none"`` to suppress summary output regardless of whether
reasoning is enabled.
+ context_tier: Context window tier for models that support it. Use
+ ``"long_context"`` to pin the session to the long-context tier.
tools: Custom tools to register with the session.
system_message: System message configuration.
available_tools: Allowlist of tools to enable. When specified, only
@@ -2342,6 +2351,8 @@ async def resume_session(
payload["reasoningEffort"] = reasoning_effort
if reasoning_summary:
payload["reasoningSummary"] = reasoning_summary
+ if context_tier:
+ payload["contextTier"] = context_tier
if tool_defs:
payload["tools"] = tool_defs
wire_system_message, transform_callbacks = _extract_transform_callbacks(system_message)
diff --git a/python/copilot/session.py b/python/copilot/session.py
index 5aac18bfa..f9bbb24c3 100644
--- a/python/copilot/session.py
+++ b/python/copilot/session.py
@@ -91,6 +91,7 @@
ReasoningEffort = Literal["low", "medium", "high", "xhigh"]
ReasoningSummary = Literal["none", "concise", "detailed"]
+ContextTier = Literal["default", "long_context"]
SessionFsConventions = Literal["posix", "windows"]
diff --git a/rust/src/types.rs b/rust/src/types.rs
index a0118e4b2..706bc3ad3 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -1157,6 +1157,9 @@ pub struct SessionConfig {
/// reasoning summaries. Use [`ReasoningSummary::None`] to suppress
/// summary output regardless of whether reasoning is enabled.
pub reasoning_summary: Option,
+ /// Context window tier for models that support it. Use `"long_context"`
+ /// to pin the session to the long-context tier.
+ pub context_tier: Option,
/// Enable streaming token deltas via `assistant.message_delta` events.
pub streaming: Option,
/// Custom system message configuration.
@@ -1370,6 +1373,7 @@ impl std::fmt::Debug for SessionConfig {
.field("client_name", &self.client_name)
.field("reasoning_effort", &self.reasoning_effort)
.field("reasoning_summary", &self.reasoning_summary)
+ .field("context_tier", &self.context_tier)
.field("streaming", &self.streaming)
.field("system_message", &self.system_message)
.field("tools", &self.tools)
@@ -1482,6 +1486,7 @@ impl Default for SessionConfig {
client_name: None,
reasoning_effort: None,
reasoning_summary: None,
+ context_tier: None,
streaming: None,
system_message: None,
tools: None,
@@ -1616,6 +1621,7 @@ impl SessionConfig {
client_name: self.client_name,
reasoning_effort: self.reasoning_effort,
reasoning_summary: self.reasoning_summary,
+ context_tier: self.context_tier,
streaming: self.streaming,
system_message: self.system_message,
tools: self.tools,
@@ -1815,6 +1821,12 @@ impl SessionConfig {
self
}
+ /// Set the context window tier (e.g. `"default"`, `"long_context"`).
+ pub fn with_context_tier(mut self, tier: impl Into) -> Self {
+ self.context_tier = Some(tier.into());
+ self
+ }
+
/// Enable streaming token deltas via `assistant.message_delta` events.
pub fn with_streaming(mut self, streaming: bool) -> Self {
self.streaming = Some(streaming);
@@ -2163,6 +2175,9 @@ pub struct ResumeSessionConfig {
/// [`ReasoningSummary::None`] to suppress summary output regardless of
/// whether reasoning is enabled.
pub reasoning_summary: Option,
+ /// Context window tier to apply after resuming the session. Use
+ /// `"long_context"` to pin the session to the long-context tier.
+ pub context_tier: Option,
/// Enable streaming token deltas.
pub streaming: Option,
/// Re-supply the system message so the agent retains workspace context
@@ -2319,6 +2334,7 @@ impl std::fmt::Debug for ResumeSessionConfig {
.field("client_name", &self.client_name)
.field("reasoning_effort", &self.reasoning_effort)
.field("reasoning_summary", &self.reasoning_summary)
+ .field("context_tier", &self.context_tier)
.field("streaming", &self.streaming)
.field("system_message", &self.system_message)
.field("tools", &self.tools)
@@ -2469,6 +2485,7 @@ impl ResumeSessionConfig {
client_name: self.client_name,
reasoning_effort: self.reasoning_effort,
reasoning_summary: self.reasoning_summary,
+ context_tier: self.context_tier,
streaming: self.streaming,
system_message: self.system_message,
tools: self.tools,
@@ -2549,6 +2566,7 @@ impl ResumeSessionConfig {
client_name: None,
reasoning_effort: None,
reasoning_summary: None,
+ context_tier: None,
streaming: None,
system_message: None,
tools: None,
@@ -2715,6 +2733,13 @@ impl ResumeSessionConfig {
self
}
+ /// Set the context window tier to apply on resume (e.g. `"default"`,
+ /// `"long_context"`).
+ pub fn with_context_tier(mut self, tier: impl Into) -> Self {
+ self.context_tier = Some(tier.into());
+ self
+ }
+
/// Enable streaming token deltas via `assistant.message_delta` events.
pub fn with_streaming(mut self, streaming: bool) -> Self {
self.streaming = Some(streaming);
diff --git a/rust/src/wire.rs b/rust/src/wire.rs
index 05f44aabf..02ae1a92d 100644
--- a/rust/src/wire.rs
+++ b/rust/src/wire.rs
@@ -55,6 +55,8 @@ pub(crate) struct SessionCreateWire {
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_summary: Option,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub context_tier: Option,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub streaming: Option,
#[serde(skip_serializing_if = "Option::is_none")]
pub system_message: Option,
@@ -157,6 +159,8 @@ pub(crate) struct SessionResumeWire {
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_summary: Option,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub context_tier: Option,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub streaming: Option,
#[serde(skip_serializing_if = "Option::is_none")]
pub system_message: Option,
From 88346236105252e31a73331f721ca08b448a2efb Mon Sep 17 00:00:00 2001
From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Date: Fri, 29 May 2026 11:49:20 -0700
Subject: [PATCH 3/4] Tests
---
dotnet/test/Unit/CloneTests.cs | 15 +++++++++++++++
go/client_test.go | 32 ++++++++++++++++++++++++++++++++
nodejs/test/client.test.ts | 32 ++++++++++++++++++++++++++++++++
python/test_client.py | 33 +++++++++++++++++++++++++++++++++
rust/src/types.rs | 4 ++++
5 files changed, 116 insertions(+)
diff --git a/dotnet/test/Unit/CloneTests.cs b/dotnet/test/Unit/CloneTests.cs
index 3870465eb..f34056b97 100644
--- a/dotnet/test/Unit/CloneTests.cs
+++ b/dotnet/test/Unit/CloneTests.cs
@@ -69,6 +69,7 @@ public void SessionConfig_Clone_CopiesAllProperties()
Model = "gpt-4",
ReasoningEffort = "high",
ReasoningSummary = ReasoningSummary.Detailed,
+ ContextTier = "long_context",
ConfigDirectory = "/config",
AvailableTools = ["tool1", "tool2"],
ExcludedTools = ["tool3"],
@@ -107,6 +108,7 @@ public void SessionConfig_Clone_CopiesAllProperties()
Assert.Equal(original.Model, clone.Model);
Assert.Equal(original.ReasoningEffort, clone.ReasoningEffort);
Assert.Equal(original.ReasoningSummary, clone.ReasoningSummary);
+ Assert.Equal(original.ContextTier, clone.ContextTier);
Assert.Equal(original.ConfigDirectory, clone.ConfigDirectory);
Assert.Equal(original.AvailableTools, clone.AvailableTools);
Assert.Equal(original.ExcludedTools, clone.ExcludedTools);
@@ -379,6 +381,19 @@ public void ResumeSessionConfig_Clone_CopiesReasoningSummary()
Assert.Equal(original.ReasoningSummary, clone.ReasoningSummary);
}
+ [Fact]
+ public void ResumeSessionConfig_Clone_CopiesContextTier()
+ {
+ var original = new ResumeSessionConfig
+ {
+ ContextTier = "long_context",
+ };
+
+ var clone = original.Clone();
+
+ Assert.Equal(original.ContextTier, clone.ContextTier);
+ }
+
[Fact]
public void ResumeSessionConfig_Clone_CopiesPluginDirectoriesAndLargeOutput()
{
diff --git a/go/client_test.go b/go/client_test.go
index 012084701..e8ca4f06e 100644
--- a/go/client_test.go
+++ b/go/client_test.go
@@ -434,6 +434,38 @@ func TestSessionRequests_ReasoningSummary(t *testing.T) {
})
}
+func TestSessionRequests_ContextTier(t *testing.T) {
+ t.Run("create includes contextTier in JSON when set", func(t *testing.T) {
+ req := createSessionRequest{ContextTier: "long_context"}
+ data, err := json.Marshal(req)
+ if err != nil {
+ t.Fatalf("Failed to marshal: %v", err)
+ }
+ var m map[string]any
+ if err := json.Unmarshal(data, &m); err != nil {
+ t.Fatalf("Failed to unmarshal: %v", err)
+ }
+ if m["contextTier"] != "long_context" {
+ t.Errorf("Expected contextTier to be 'long_context', got %v", m["contextTier"])
+ }
+ })
+
+ t.Run("resume includes contextTier in JSON when set", func(t *testing.T) {
+ req := resumeSessionRequest{SessionID: "s1", ContextTier: "default"}
+ data, err := json.Marshal(req)
+ if err != nil {
+ t.Fatalf("Failed to marshal: %v", err)
+ }
+ var m map[string]any
+ if err := json.Unmarshal(data, &m); err != nil {
+ t.Fatalf("Failed to unmarshal: %v", err)
+ }
+ if m["contextTier"] != "default" {
+ t.Errorf("Expected contextTier to be 'default', got %v", m["contextTier"])
+ }
+ })
+}
+
func TestSessionRequests_PluginDirectoriesAndLargeOutput(t *testing.T) {
pluginDirs := []string{"/tmp/plugins/a", "/tmp/plugins/b"}
enabled := true
diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts
index 0a22e6b6c..3a1e83460 100644
--- a/nodejs/test/client.test.ts
+++ b/nodejs/test/client.test.ts
@@ -138,6 +138,38 @@ describe("CopilotClient", () => {
expect(resumePayload.reasoningSummary).toBe("none");
});
+ it("forwards contextTier in session.create and session.resume", async () => {
+ const client = new CopilotClient();
+ await client.start();
+ onTestFinished(() => client.forceStop());
+
+ const spy = vi
+ .spyOn((client as any).connection!, "sendRequest")
+ .mockImplementation(async (method: string, params: any) => {
+ if (method === "session.create") return { sessionId: params.sessionId };
+ if (method === "session.resume") return { sessionId: params.sessionId };
+ throw new Error(`Unexpected method: ${method}`);
+ });
+
+ const session = await client.createSession({
+ onPermissionRequest: approveAll,
+ contextTier: "long_context",
+ });
+ await client.resumeSession(session.sessionId, {
+ onPermissionRequest: approveAll,
+ contextTier: "default",
+ });
+
+ const createPayload = spy.mock.calls.find(
+ ([method]) => method === "session.create"
+ )![1] as any;
+ const resumePayload = spy.mock.calls.find(
+ ([method]) => method === "session.resume"
+ )![1] as any;
+ expect(createPayload.contextTier).toBe("long_context");
+ expect(resumePayload.contextTier).toBe("default");
+ });
+
it("forwards pluginDirectories and largeOutput in session.create and session.resume", async () => {
const client = new CopilotClient();
await client.start();
diff --git a/python/test_client.py b/python/test_client.py
index 76823b34e..b1c687204 100644
--- a/python/test_client.py
+++ b/python/test_client.py
@@ -137,6 +137,39 @@ async def mock_request(method, params, **kwargs):
finally:
await client.force_stop()
+ @pytest.mark.asyncio
+ async def test_create_and_resume_session_forward_context_tier(self):
+ client = CopilotClient(connection=RuntimeConnection.for_stdio(path=CLI_PATH))
+ await client.start()
+ try:
+ captured = {}
+
+ async def mock_request(method, params, **kwargs):
+ captured[method] = params
+ if method in ("session.create", "session.resume"):
+ result = {"sessionId": params.get("sessionId") or "session-1"}
+ callback = kwargs.get("on_response_inline")
+ if callback is not None:
+ callback(result)
+ return result
+ return {}
+
+ client._client.request = mock_request
+ session = await client.create_session(
+ on_permission_request=PermissionHandler.approve_all,
+ context_tier="long_context",
+ )
+ await client.resume_session(
+ session.session_id,
+ on_permission_request=PermissionHandler.approve_all,
+ context_tier="default",
+ )
+
+ assert captured["session.create"]["contextTier"] == "long_context"
+ assert captured["session.resume"]["contextTier"] == "default"
+ finally:
+ await client.force_stop()
+
@pytest.mark.asyncio
async def test_create_and_resume_session_forward_plugin_directories_and_large_output(self):
client = CopilotClient(connection=RuntimeConnection.for_stdio(path=CLI_PATH))
diff --git a/rust/src/types.rs b/rust/src/types.rs
index 706bc3ad3..3bb7d5e9a 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -4576,6 +4576,7 @@ mod tests {
.with_client_name("test-app")
.with_reasoning_effort("medium")
.with_reasoning_summary(ReasoningSummary::Concise)
+ .with_context_tier("long_context")
.with_streaming(true)
.with_tools([Tool::new("greet")])
.with_available_tools(["bash", "view"])
@@ -4599,6 +4600,7 @@ mod tests {
assert_eq!(cfg.client_name.as_deref(), Some("test-app"));
assert_eq!(cfg.reasoning_effort.as_deref(), Some("medium"));
assert_eq!(cfg.reasoning_summary, Some(ReasoningSummary::Concise));
+ assert_eq!(cfg.context_tier.as_deref(), Some("long_context"));
assert_eq!(cfg.streaming, Some(true));
assert_eq!(cfg.tools.as_ref().map(|t| t.len()), Some(1));
assert_eq!(
@@ -4640,6 +4642,7 @@ mod tests {
let cfg = ResumeSessionConfig::new(SessionId::from("sess-2"))
.with_client_name("test-app")
.with_reasoning_summary(ReasoningSummary::None)
+ .with_context_tier("default")
.with_streaming(true)
.with_tools([Tool::new("greet")])
.with_available_tools(["bash", "view"])
@@ -4663,6 +4666,7 @@ mod tests {
assert_eq!(cfg.session_id.as_str(), "sess-2");
assert_eq!(cfg.client_name.as_deref(), Some("test-app"));
assert_eq!(cfg.reasoning_summary, Some(ReasoningSummary::None));
+ assert_eq!(cfg.context_tier.as_deref(), Some("default"));
assert_eq!(cfg.streaming, Some(true));
assert_eq!(cfg.tools.as_ref().map(|t| t.len()), Some(1));
assert_eq!(
From 44add6463ddeacfe4a0328eb27ba933ba2268308 Mon Sep 17 00:00:00 2001
From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Date: Fri, 29 May 2026 11:56:32 -0700
Subject: [PATCH 4/4] Added Java
---
.../github/copilot/SessionRequestBuilder.java | 2 ++
.../copilot/rpc/CreateSessionRequest.java | 13 ++++++++++
.../copilot/rpc/ResumeSessionConfig.java | 25 +++++++++++++++++++
.../copilot/rpc/ResumeSessionRequest.java | 13 ++++++++++
.../com/github/copilot/rpc/SessionConfig.java | 25 +++++++++++++++++++
.../com/github/copilot/ConfigCloneTest.java | 4 +++
.../copilot/SessionRequestBuilderTest.java | 14 +++++++++++
7 files changed, 96 insertions(+)
diff --git a/java/src/main/java/com/github/copilot/SessionRequestBuilder.java b/java/src/main/java/com/github/copilot/SessionRequestBuilder.java
index bcd08bf5d..ded92a506 100644
--- a/java/src/main/java/com/github/copilot/SessionRequestBuilder.java
+++ b/java/src/main/java/com/github/copilot/SessionRequestBuilder.java
@@ -107,6 +107,7 @@ static CreateSessionRequest buildCreateRequest(SessionConfig config, String sess
request.setClientName(config.getClientName());
request.setReasoningEffort(config.getReasoningEffort());
request.setReasoningSummary(config.getReasoningSummary());
+ request.setContextTier(config.getContextTier());
request.setTools(config.getTools());
request.setSystemMessage(config.getSystemMessage());
request.setAvailableTools(config.getAvailableTools());
@@ -217,6 +218,7 @@ static ResumeSessionRequest buildResumeRequest(String sessionId, ResumeSessionCo
request.setClientName(config.getClientName());
request.setReasoningEffort(config.getReasoningEffort());
request.setReasoningSummary(config.getReasoningSummary());
+ request.setContextTier(config.getContextTier());
request.setTools(config.getTools());
request.setSystemMessage(config.getSystemMessage());
request.setAvailableTools(config.getAvailableTools());
diff --git a/java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java b/java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java
index c5dc200f9..f7d2d44c3 100644
--- a/java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java
+++ b/java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java
@@ -39,6 +39,9 @@ public final class CreateSessionRequest {
@JsonProperty("reasoningSummary")
private String reasoningSummary;
+ @JsonProperty("contextTier")
+ private String contextTier;
+
@JsonProperty("tools")
private List tools;
@@ -234,6 +237,16 @@ public void setReasoningSummary(String reasoningSummary) {
this.reasoningSummary = reasoningSummary;
}
+ /** Gets the context window tier. @return the context window tier */
+ public String getContextTier() {
+ return contextTier;
+ }
+
+ /** Sets the context window tier. @param contextTier the context window tier */
+ public void setContextTier(String contextTier) {
+ this.contextTier = contextTier;
+ }
+
/** Gets the tools. @return the tool definitions */
public List getTools() {
return tools == null ? null : Collections.unmodifiableList(tools);
diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java
index 26a0f6876..aee27e1b1 100644
--- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java
+++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java
@@ -52,6 +52,7 @@ public class ResumeSessionConfig {
private Boolean manageScheduleEnabled;
private String reasoningEffort;
private String reasoningSummary;
+ private String contextTier;
private ModelCapabilitiesOverride modelCapabilities;
private PermissionHandler onPermissionRequest;
private UserInputHandler onUserInputRequest;
@@ -504,6 +505,29 @@ public ResumeSessionConfig setReasoningSummary(String reasoningSummary) {
return this;
}
+ /**
+ * Gets the context window tier.
+ *
+ * @return the context window tier ("default" or "long_context")
+ */
+ public String getContextTier() {
+ return contextTier;
+ }
+
+ /**
+ * Sets the context window tier to apply on resume for models that support it.
+ * Use {@code "long_context"} to pin the session to the long-context tier; omit
+ * or use {@code "default"} otherwise.
+ *
+ * @param contextTier
+ * the context window tier
+ * @return this config for method chaining
+ */
+ public ResumeSessionConfig setContextTier(String contextTier) {
+ this.contextTier = contextTier;
+ return this;
+ }
+
/**
* Gets the permission request handler.
*
@@ -1505,6 +1529,7 @@ public ResumeSessionConfig clone() {
copy.enableSessionTelemetry = this.enableSessionTelemetry;
copy.reasoningEffort = this.reasoningEffort;
copy.reasoningSummary = this.reasoningSummary;
+ copy.contextTier = this.contextTier;
copy.modelCapabilities = this.modelCapabilities;
copy.onPermissionRequest = this.onPermissionRequest;
copy.onUserInputRequest = this.onUserInputRequest;
diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java
index 66cee6b95..c8cdc5a2d 100644
--- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java
+++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java
@@ -41,6 +41,9 @@ public final class ResumeSessionRequest {
@JsonProperty("reasoningSummary")
private String reasoningSummary;
+ @JsonProperty("contextTier")
+ private String contextTier;
+
@JsonProperty("tools")
private List tools;
@@ -236,6 +239,16 @@ public void setReasoningSummary(String reasoningSummary) {
this.reasoningSummary = reasoningSummary;
}
+ /** Gets the context window tier. @return the context window tier */
+ public String getContextTier() {
+ return contextTier;
+ }
+
+ /** Sets the context window tier. @param contextTier the context window tier */
+ public void setContextTier(String contextTier) {
+ this.contextTier = contextTier;
+ }
+
/** Gets the tools. @return the tool definitions */
public List getTools() {
return tools == null ? null : Collections.unmodifiableList(tools);
diff --git a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java
index c8c897df2..fa7fd2244 100644
--- a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java
+++ b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java
@@ -43,6 +43,7 @@ public class SessionConfig {
private String model;
private String reasoningEffort;
private String reasoningSummary;
+ private String contextTier;
private List tools;
private SystemMessageConfig systemMessage;
private List availableTools;
@@ -207,6 +208,29 @@ public SessionConfig setReasoningSummary(String reasoningSummary) {
return this;
}
+ /**
+ * Gets the context window tier.
+ *
+ * @return the context window tier ("default" or "long_context")
+ */
+ public String getContextTier() {
+ return contextTier;
+ }
+
+ /**
+ * Sets the context window tier for models that support it. Use
+ * {@code "long_context"} to pin the session to the long-context tier; omit or
+ * use {@code "default"} otherwise.
+ *
+ * @param contextTier
+ * the context window tier
+ * @return this config instance for method chaining
+ */
+ public SessionConfig setContextTier(String contextTier) {
+ this.contextTier = contextTier;
+ return this;
+ }
+
/**
* Gets the custom tools for this session.
*
@@ -1619,6 +1643,7 @@ public SessionConfig clone() {
copy.model = this.model;
copy.reasoningEffort = this.reasoningEffort;
copy.reasoningSummary = this.reasoningSummary;
+ copy.contextTier = this.contextTier;
copy.tools = this.tools != null ? new ArrayList<>(this.tools) : null;
copy.systemMessage = this.systemMessage;
copy.availableTools = this.availableTools != null ? new ArrayList<>(this.availableTools) : null;
diff --git a/java/src/test/java/com/github/copilot/ConfigCloneTest.java b/java/src/test/java/com/github/copilot/ConfigCloneTest.java
index 2efafdfc5..81c937dbe 100644
--- a/java/src/test/java/com/github/copilot/ConfigCloneTest.java
+++ b/java/src/test/java/com/github/copilot/ConfigCloneTest.java
@@ -116,6 +116,7 @@ void sessionConfigCloneBasic() {
original.setClientName("my-app");
original.setModel("gpt-4o");
original.setReasoningSummary("detailed");
+ original.setContextTier("long_context");
original.setPluginDirectories(List.of("/plugins/a", "/plugins/b"));
original.setLargeOutput(
new LargeToolOutputConfig().setEnabled(true).setMaxSizeBytes(1024L).setOutputDirectory("/tmp/out"));
@@ -127,6 +128,7 @@ void sessionConfigCloneBasic() {
assertEquals(original.getClientName(), cloned.getClientName());
assertEquals(original.getModel(), cloned.getModel());
assertEquals(original.getReasoningSummary(), cloned.getReasoningSummary());
+ assertEquals(original.getContextTier(), cloned.getContextTier());
assertEquals(original.getPluginDirectories(), cloned.getPluginDirectories());
assertEquals(original.getLargeOutput(), cloned.getLargeOutput());
assertEquals(original.isStreaming(), cloned.isStreaming());
@@ -171,6 +173,7 @@ void resumeSessionConfigCloneBasic() {
ResumeSessionConfig original = new ResumeSessionConfig();
original.setModel("o1");
original.setReasoningSummary("none");
+ original.setContextTier("long_context");
original.setPluginDirectories(List.of("/plugins/r"));
original.setLargeOutput(
new LargeToolOutputConfig().setEnabled(false).setMaxSizeBytes(2048L).setOutputDirectory("/tmp/resume"));
@@ -180,6 +183,7 @@ void resumeSessionConfigCloneBasic() {
assertEquals(original.getModel(), cloned.getModel());
assertEquals(original.getReasoningSummary(), cloned.getReasoningSummary());
+ assertEquals(original.getContextTier(), cloned.getContextTier());
assertEquals(original.getPluginDirectories(), cloned.getPluginDirectories());
assertEquals(original.getLargeOutput(), cloned.getLargeOutput());
assertEquals(original.isStreaming(), cloned.isStreaming());
diff --git a/java/src/test/java/com/github/copilot/SessionRequestBuilderTest.java b/java/src/test/java/com/github/copilot/SessionRequestBuilderTest.java
index c97114b27..9b7e28e85 100644
--- a/java/src/test/java/com/github/copilot/SessionRequestBuilderTest.java
+++ b/java/src/test/java/com/github/copilot/SessionRequestBuilderTest.java
@@ -98,6 +98,13 @@ void testBuildCreateRequestSetsReasoningSummary() {
assertEquals("concise", request.getReasoningSummary());
}
+ @Test
+ void testBuildCreateRequestSetsContextTier() {
+ var config = new SessionConfig().setContextTier("long_context");
+ CreateSessionRequest request = SessionRequestBuilder.buildCreateRequest(config);
+ assertEquals("long_context", request.getContextTier());
+ }
+
@Test
void testBuildCreateRequestSetsPluginDirectoriesAndLargeOutput() {
var largeOutput = new LargeToolOutputConfig().setEnabled(true).setMaxSizeBytes(1024L)
@@ -313,6 +320,13 @@ void testBuildResumeRequestSetsReasoningSummary() {
assertEquals("none", request.getReasoningSummary());
}
+ @Test
+ void testBuildResumeRequestSetsContextTier() {
+ var config = new ResumeSessionConfig().setContextTier("default");
+ ResumeSessionRequest request = SessionRequestBuilder.buildResumeRequest("sid-15", config);
+ assertEquals("default", request.getContextTier());
+ }
+
@Test
void testBuildResumeRequestSetsPluginDirectoriesAndLargeOutput() {
var largeOutput = new LargeToolOutputConfig().setEnabled(false).setMaxSizeBytes(2048L)