@@ -784,9 +784,25 @@ describe('Request Transformer Module', () => {
784784 it ( 'should return undefined for undefined input' , ( ) => {
785785 expect ( addCodexBridgeMessage ( undefined , true ) ) . toBeUndefined ( ) ;
786786 } ) ;
787+
788+ it ( 'should list built-in Responses tools in the runtime manifest' , ( ) => {
789+ const input : InputItem [ ] = [
790+ { type : 'message' , role : 'user' , content : 'hello' } ,
791+ ] ;
792+ const result = addCodexBridgeMessage ( input , true , [
793+ { type : 'web_search_preview' , search_context_size : 'medium' } ,
794+ { type : 'file_search' , vector_store_ids : [ 'vs_123' ] } ,
795+ { type : 'function' , function : { name : 'read_file' } } ,
796+ ] ) ;
797+
798+ const bridgeText = ( result ?. [ 0 ] . content as any ) [ 0 ] . text ;
799+ expect ( bridgeText ) . toContain ( '`web_search_preview`' ) ;
800+ expect ( bridgeText ) . toContain ( '`file_search`' ) ;
801+ expect ( bridgeText ) . toContain ( '`read_file`' ) ;
802+ } ) ;
787803 } ) ;
788804
789- describe ( 'transformRequestBody' , ( ) => {
805+ describe ( 'transformRequestBody' , ( ) => {
790806 const codexInstructions = 'Test Codex Instructions' ;
791807
792808 it ( 'preserves existing prompt_cache_key passed by host (OpenCode)' , async ( ) => {
@@ -1479,6 +1495,27 @@ describe('Request Transformer Module', () => {
14791495 expect ( result . max_completion_tokens ) . toBeUndefined ( ) ;
14801496 } ) ;
14811497
1498+ it ( 'should preserve newer Responses passthrough fields' , async ( ) => {
1499+ const body : RequestBody = {
1500+ model : 'gpt-5' ,
1501+ input : [ ] ,
1502+ previous_response_id : 'resp_123' ,
1503+ parallel_tool_calls : true ,
1504+ service_tier : 'auto' ,
1505+ metadata : { source : 'test-suite' } ,
1506+ tool_choice : 'auto' ,
1507+ truncation : 'auto' ,
1508+ } ;
1509+ const result = await transformRequestBody ( body , codexInstructions ) ;
1510+
1511+ expect ( result . previous_response_id ) . toBe ( 'resp_123' ) ;
1512+ expect ( result . parallel_tool_calls ) . toBe ( true ) ;
1513+ expect ( result . service_tier ) . toBe ( 'auto' ) ;
1514+ expect ( result . metadata ) . toEqual ( { source : 'test-suite' } ) ;
1515+ expect ( result . tool_choice ) . toBe ( 'auto' ) ;
1516+ expect ( result . truncation ) . toBe ( 'auto' ) ;
1517+ } ) ;
1518+
14821519 it ( 'should normalize minimal to low for gpt-5-codex' , async ( ) => {
14831520 const body : RequestBody = {
14841521 model : 'gpt-5-codex' ,
0 commit comments