diff --git a/.netconfig b/.netconfig
index bba6f22..acd6815 100644
--- a/.netconfig
+++ b/.netconfig
@@ -105,13 +105,13 @@
weak
[file "src/Directory.Build.props"]
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
- sha = dd13ed3334135c30dcb1e3b2295dc7622de298d9
- etag = b2b90c6d617db9712cc8be2031b767d3ba951015717984f52b4872cc39f93e72
+ sha = 6e2438919e108aeb75106dc0737c45f5e55d5f42
+ etag = f1d6384abf18d8d891ce5e835a10c73fe029c42151374be96d7e4af43d189c65
weak
[file "src/Directory.Build.targets"]
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
- sha = 083a37bd9307ec820bac6ee3c7384083151d36d8
- etag = 907682e5632a2ba430357e6e042a4ca33cb8c94a3a215d3091aa03f5958a4877
+ sha = 6e2438919e108aeb75106dc0737c45f5e55d5f42
+ etag = 31cf95c54402944a7aeddcde93cea5f2403ae594212307513d9b93c53ef62fb6
weak
[file "src/nuget.config"]
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
@@ -152,8 +152,8 @@
weak
[file "src/xAI.Protocol/chat.proto"]
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/chat.proto
- sha = c9345abd85649ecb5b27fe8708f573b4ab9d6971
- etag = a64a560fdac1cb6d349d38b19a58605fa59169879f3d6d517518e573fd137b8c
+ sha = 543b901d69762b8e96f72450ac3619332eba698a
+ etag = 22ba3971b319bccdde31765038300c8e70fee80b7bb239ed7b427c014e35ab1b
weak
[file "src/xAI.Protocol/deferred.proto"]
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/deferred.proto
@@ -192,8 +192,8 @@
weak
[file "src/xAI.Protocol/usage.proto"]
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/usage.proto
- sha = 362749661fa2d340d234ad372fab920538897821
- etag = 9fcf9731a547857d554e968968aedc3016fc5210e0a45d5b59d75a03b816a81e
+ sha = 64093a42a740c2b28d62281db11ee633c1df6ea1
+ etag = ab94abd9c126b5ade766ec41f1e200412de6b37b4b2ed224897df72ab9e162bb
weak
[file "src/xAI.Protocol/video.proto"]
url = https://github.com/xai-org/xai-proto/blob/main/proto/xai/api/v1/video.proto
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 91ba1a5..93a0b1e 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -47,6 +47,9 @@
false
true
+
+
+ false
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
index a3df56d..52391ed 100644
--- a/src/Directory.Build.targets
+++ b/src/Directory.Build.targets
@@ -32,6 +32,13 @@
true
+
+
+
+
+
+
+
diff --git a/src/xAI.Protocol/chat.proto b/src/xAI.Protocol/chat.proto
index 70e0c06..3324452 100644
--- a/src/xAI.Protocol/chat.proto
+++ b/src/xAI.Protocol/chat.proto
@@ -32,6 +32,12 @@ service Chat {
// Delete a stored response using the response ID.
rpc DeleteStoredCompletion(DeleteStoredCompletionRequest) returns (DeleteStoredCompletionResponse) {}
+
+ // Compacts a full input context and returns a compacted context.
+ // The client sends the current input items and receives back a compacted
+ // set of items (with an opaque compaction blob) suitable for use as
+ // the input to the next request.
+ rpc CompactContext(CompactContextRequest) returns (CompactContextResponse) {}
}
message GetCompletionsRequest {
@@ -675,6 +681,9 @@ message WebSearch {
// Setting this will make the agentic search results more relevant to the specified location,
// which is useful for geolocation-based search results refinement.
optional WebSearchUserLocation user_location = 4;
+
+ // Enable image search results that can be embedded in responses.
+ optional bool enable_image_search = 5;
}
// The user location to use for a preference on the search results.
@@ -1127,3 +1136,33 @@ message DebugOutput {
// The tag of the sampler that served this request.
string sampler_tag = 11;
}
+
+// ── Context compaction messages ─────────────────────────────────────────
+
+// Request for the standalone CompactContext RPC.
+message CompactContextRequest {
+ // Model to use for generating the compaction blob.
+ string model = 1;
+
+ // Full current input window as proto messages.
+ // This is the same set of messages the client would send in
+ // GetCompletionsRequest.messages.
+ repeated Message input = 2;
+}
+
+// Response from the standalone CompactContext RPC.
+message CompactContextResponse {
+ // Unique compaction ID (e.g. cmp_).
+ string id = 1;
+
+ // Opaque blob representing the compacted conversation. Clients must pass
+ // this back unchanged in subsequent requests.
+ string encrypted_content = 2;
+
+ // Number of input Message entries (role + content pairs) from the
+ // original input that were dropped or folded into the compacted blob.
+ uint32 dropped_message_count = 3;
+
+ // Token usage from the compacting model call.
+ SamplingUsage usage = 4;
+}
diff --git a/src/xAI.Protocol/usage.proto b/src/xAI.Protocol/usage.proto
index 3b532b4..171c0ba 100644
--- a/src/xAI.Protocol/usage.proto
+++ b/src/xAI.Protocol/usage.proto
@@ -1,5 +1,4 @@
syntax = "proto3";
-option csharp_namespace = "xAI.Protocol";
package xai_api;
@@ -65,4 +64,5 @@ enum ServerSideTool {
SERVER_SIDE_TOOL_COLLECTIONS_SEARCH = 6;
SERVER_SIDE_TOOL_MCP = 7;
SERVER_SIDE_TOOL_ATTACHMENT_SEARCH = 8;
+ SERVER_SIDE_TOOL_IMAGE_SEARCH = 10;
}