@@ -754,6 +754,22 @@ describe('Request Transformer Module', () => {
754754 it ( 'should return undefined for undefined input' , ( ) => {
755755 expect ( addCodexBridgeMessage ( undefined , true ) ) . toBeUndefined ( ) ;
756756 } ) ;
757+
758+ it ( 'should list built-in Responses tools in the runtime manifest' , ( ) => {
759+ const input : InputItem [ ] = [
760+ { type : 'message' , role : 'user' , content : 'hello' } ,
761+ ] ;
762+ const result = addCodexBridgeMessage ( input , true , [
763+ { type : 'web_search_preview' , search_context_size : 'medium' } ,
764+ { type : 'file_search' , vector_store_ids : [ 'vs_123' ] } ,
765+ { type : 'function' , function : { name : 'read_file' } } ,
766+ ] ) ;
767+
768+ const bridgeText = ( result ?. [ 0 ] . content as any ) [ 0 ] . text ;
769+ expect ( bridgeText ) . toContain ( '`web_search_preview`' ) ;
770+ expect ( bridgeText ) . toContain ( '`file_search`' ) ;
771+ expect ( bridgeText ) . toContain ( '`read_file`' ) ;
772+ } ) ;
757773 } ) ;
758774
759775 describe ( 'transformRequestBody' , ( ) => {
@@ -1449,6 +1465,27 @@ describe('Request Transformer Module', () => {
14491465 expect ( result . max_completion_tokens ) . toBeUndefined ( ) ;
14501466 } ) ;
14511467
1468+ it ( 'should preserve newer Responses passthrough fields' , async ( ) => {
1469+ const body : RequestBody = {
1470+ model : 'gpt-5' ,
1471+ input : [ ] ,
1472+ previous_response_id : 'resp_123' ,
1473+ parallel_tool_calls : true ,
1474+ service_tier : 'auto' ,
1475+ metadata : { source : 'test-suite' } ,
1476+ tool_choice : 'auto' ,
1477+ truncation : 'auto' ,
1478+ } ;
1479+ const result = await transformRequestBody ( body , codexInstructions ) ;
1480+
1481+ expect ( result . previous_response_id ) . toBe ( 'resp_123' ) ;
1482+ expect ( result . parallel_tool_calls ) . toBe ( true ) ;
1483+ expect ( result . service_tier ) . toBe ( 'auto' ) ;
1484+ expect ( result . metadata ) . toEqual ( { source : 'test-suite' } ) ;
1485+ expect ( result . tool_choice ) . toBe ( 'auto' ) ;
1486+ expect ( result . truncation ) . toBe ( 'auto' ) ;
1487+ } ) ;
1488+
14521489 it ( 'should normalize minimal to low for gpt-5-codex' , async ( ) => {
14531490 const body : RequestBody = {
14541491 model : 'gpt-5-codex' ,
0 commit comments