@@ -163,6 +163,7 @@ type PoolRetryHarness = {
163163 model ?: string ;
164164 path ?: "/v1/responses" | "/v1/responses/compact" ;
165165 callerBearer ?: boolean ;
166+ extraBody ?: Record < string , unknown > ;
166167 } ) => Promise < Response > ;
167168 restoreFetch : ( ) => void ;
168169 server : ReturnType < typeof startServer > ;
@@ -309,13 +310,14 @@ async function startPoolRetryHarness(
309310 model = POOL_RETRY_MODEL ,
310311 path = "/v1/responses" ,
311312 callerBearer = true ,
313+ extraBody = { } ,
312314 } = { } ) => originalGlobalFetch ( new URL ( path , server . url ) , {
313315 method : "POST" ,
314316 headers : {
315317 "content-type" : "application/json" ,
316318 ...( callerBearer ? { authorization : "Bearer inbound-token" } : { } ) ,
317319 } ,
318- body : JSON . stringify ( { model, input : path . endsWith ( "/compact" ) ? [ ] : "hello" , stream } ) ,
320+ body : JSON . stringify ( { model, input : path . endsWith ( "/compact" ) ? [ ] : "hello" , stream, ... extraBody } ) ,
319321 signal,
320322 } ) ,
321323 } ;
@@ -2142,6 +2144,33 @@ describe("server local API auth", () => {
21422144 }
21432145 } ) ;
21442146
2147+ test ( "#2097: Daybreak keeps its entitlement identity but uses the stable wire model" , async ( ) => {
2148+ const model = "gpt-daybreak-blue-latest" ;
2149+ let upstreamBody : Record < string , unknown > | undefined ;
2150+ const harness = await startPoolRetryHarness (
2151+ async ( _accountId , request ) => {
2152+ upstreamBody = await request . json ( ) as Record < string , unknown > ;
2153+ return Response . json ( { id : "canonical-wire-success" , status : "completed" , output : [ ] } ) ;
2154+ } ,
2155+ {
2156+ secondAccount : false ,
2157+ modelRosterByAccount : { "acct-pool-a" : [ "gpt-5.6-sol" , model ] } ,
2158+ } ,
2159+ ) ;
2160+ try {
2161+ const response = await harness . request ( {
2162+ model,
2163+ extraBody : { prompt_cache_retention : "24h" } ,
2164+ } ) ;
2165+ expect ( response . status ) . toBe ( 200 ) ;
2166+ expect ( upstreamBody ?. model ) . toBe ( "gpt-5.6-sol" ) ;
2167+ expect ( upstreamBody ) . not . toHaveProperty ( "prompt_cache_retention" ) ;
2168+ expect ( harness . dispatches ) . toEqual ( [ "acct-pool-a" ] ) ;
2169+ } finally {
2170+ await stopPoolRetryHarness ( harness ) ;
2171+ }
2172+ } ) ;
2173+
21452174 test ( "#2097: a confirmed entitled account survives two transient unsupported-model 400s in place" , async ( ) => {
21462175 const model = "gpt-daybreak-blue-latest" ;
21472176 let attempts = 0 ;
0 commit comments