@@ -183,18 +183,6 @@ pub enum ToolChoice {
183183 } ,
184184}
185185
186- /// Configuration for the compression model.
187- /// Only relevant for the `agentic` compression model.
188- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
189- pub struct CompressionConfiguration {
190- /// Compression rate (0.0-1.0). Defaults to 0.8 when not specified.
191- #[ serde( skip_serializing_if = "Option::is_none" ) ]
192- pub rate : Option < f64 > ,
193- /// Semantic preservation threshold (0-100).
194- #[ serde( skip_serializing_if = "Option::is_none" ) ]
195- pub semantic_preservation_threshold : Option < i32 > ,
196- }
197-
198186/// Input for the chat completion request
199187#[ derive( Debug , Clone , Serialize ) ]
200188pub struct InputObject {
@@ -205,16 +193,11 @@ pub struct InputObject {
205193 pub tool_choice : Option < serde_json:: Value > ,
206194 #[ serde( skip_serializing_if = "Option::is_none" ) ]
207195 pub tags : Option < Vec < String > > ,
208- /// Compression model for this request (agentic, claude, opencode, cursor, or customer).
196+ /// Compression model for this request (claude, opencode, cursor, or customer).
209197 /// Only one compression model per request. Each model is a bundle of strategies.
210198 /// This is a gateway-internal field and is never sent to providers.
211199 #[ serde( default , skip_serializing) ]
212200 pub compression_model : Option < String > ,
213- /// Configuration for the compression model (rate, semantic preservation threshold).
214- /// Only relevant for the `agentic` compression model.
215- /// This is a gateway-internal field and is never sent to providers.
216- #[ serde( default , skip_serializing) ]
217- pub compression_configuration : Option < CompressionConfiguration > ,
218201}
219202
220203impl InputObject {
@@ -226,7 +209,6 @@ impl InputObject {
226209 tool_choice : None ,
227210 tags : None ,
228211 compression_model : None ,
229- compression_configuration : None ,
230212 }
231213 }
232214
@@ -248,17 +230,11 @@ impl InputObject {
248230 self
249231 }
250232
251- /// Set the compression model for this request (agentic, claude, opencode, cursor, customer)
233+ /// Set the compression model for this request (claude, opencode, cursor, customer)
252234 pub fn with_compression_model ( mut self , model : impl Into < String > ) -> Self {
253235 self . compression_model = Some ( model. into ( ) ) ;
254236 self
255237 }
256-
257- /// Set the compression configuration (only relevant for agentic model)
258- pub fn with_compression_configuration ( mut self , config : CompressionConfiguration ) -> Self {
259- self . compression_configuration = Some ( config) ;
260- self
261- }
262238}
263239
264240/// Token usage information
@@ -438,15 +414,8 @@ mod tests {
438414 #[ test]
439415 fn test_input_object_with_compression_builder ( ) {
440416 let input = InputObject :: new ( vec ! [ Message :: user( "Hello" ) ] )
441- . with_compression_model ( "agentic" )
442- . with_compression_configuration ( CompressionConfiguration {
443- rate : Some ( 0.5 ) ,
444- semantic_preservation_threshold : Some ( 60 ) ,
445- } ) ;
446-
447- assert_eq ! ( input. compression_model, Some ( "agentic" . to_string( ) ) ) ;
448- let config = input. compression_configuration . unwrap ( ) ;
449- assert_eq ! ( config. rate, Some ( 0.5 ) ) ;
450- assert_eq ! ( config. semantic_preservation_threshold, Some ( 60 ) ) ;
417+ . with_compression_model ( "claude" ) ;
418+
419+ assert_eq ! ( input. compression_model, Some ( "claude" . to_string( ) ) ) ;
451420 }
452421}
0 commit comments