@@ -32,6 +32,12 @@ service Chat {
3232
3333 // Delete a stored response using the response ID.
3434 rpc DeleteStoredCompletion (DeleteStoredCompletionRequest ) returns (DeleteStoredCompletionResponse ) {}
35+
36+ // Compacts a full input context and returns a compacted context.
37+ // The client sends the current input items and receives back a compacted
38+ // set of items (with an opaque compaction blob) suitable for use as
39+ // the input to the next request.
40+ rpc CompactContext (CompactContextRequest ) returns (CompactContextResponse ) {}
3541}
3642
3743message GetCompletionsRequest {
@@ -675,6 +681,9 @@ message WebSearch {
675681 // Setting this will make the agentic search results more relevant to the specified location,
676682 // which is useful for geolocation-based search results refinement.
677683 optional WebSearchUserLocation user_location = 4 ;
684+
685+ // Enable image search results that can be embedded in responses.
686+ optional bool enable_image_search = 5 ;
678687}
679688
680689// The user location to use for a preference on the search results.
@@ -1127,3 +1136,33 @@ message DebugOutput {
11271136 // The tag of the sampler that served this request.
11281137 string sampler_tag = 11 ;
11291138}
1139+
1140+ // ── Context compaction messages ─────────────────────────────────────────
1141+
1142+ // Request for the standalone CompactContext RPC.
1143+ message CompactContextRequest {
1144+ // Model to use for generating the compaction blob.
1145+ string model = 1 ;
1146+
1147+ // Full current input window as proto messages.
1148+ // This is the same set of messages the client would send in
1149+ // GetCompletionsRequest.messages.
1150+ repeated Message input = 2 ;
1151+ }
1152+
1153+ // Response from the standalone CompactContext RPC.
1154+ message CompactContextResponse {
1155+ // Unique compaction ID (e.g. cmp_<uuid>).
1156+ string id = 1 ;
1157+
1158+ // Opaque blob representing the compacted conversation. Clients must pass
1159+ // this back unchanged in subsequent requests.
1160+ string encrypted_content = 2 ;
1161+
1162+ // Number of input Message entries (role + content pairs) from the
1163+ // original input that were dropped or folded into the compacted blob.
1164+ uint32 dropped_message_count = 3 ;
1165+
1166+ // Token usage from the compacting model call.
1167+ SamplingUsage usage = 4 ;
1168+ }
0 commit comments