@@ -84,9 +84,9 @@ var _ = Describe("P2P KV cache source header", func() {
8484
8585 kvParams , ok := dreq [requestFieldKVTransferParams ].(map [string ]any )
8686 Expect (ok ).To (BeTrue ())
87- Expect (kvParams ).ToNot (HaveKey (requestFieldP2PDecodeParams ))
88- Expect (kvParams ).ToNot (HaveKey (requestFieldP2PPrefillParams ))
89- p2p , ok := kvParams [requestFieldP2PParams ].(map [string ]any )
87+ Expect (kvParams ).ToNot (HaveKey (requestFieldRemoteDecoder ))
88+ Expect (kvParams ).ToNot (HaveKey (requestFieldRemotePrefiller ))
89+ p2p , ok := kvParams [requestFieldRemoteKVSource ].(map [string ]any )
9090 Expect (ok ).To (BeTrue ())
9191 Expect (p2p [requestFieldKVRequestID ]).ToNot (BeEmpty ())
9292 Expect (p2p [requestFieldRemoteHost ]).To (Equal ("10.9.9.9" ))
@@ -112,37 +112,38 @@ var _ = Describe("P2P KV cache source header", func() {
112112 return len (testInfo .prefillHandler .GetCompletionRequests ())
113113 }).Should (Equal (1 ))
114114
115- // Prefill leg: decode + p2p, each with its own kv_request_id.
115+ // Prefill leg: remote_decoder + remote_kv_source, each with its own
116+ // kv_request_id.
116117 preq := testInfo .prefillHandler .GetCompletionRequests ()[0 ]
117118 prefillKVParams , ok := preq [requestFieldKVTransferParams ].(map [string ]any )
118119 Expect (ok ).To (BeTrue ())
119- decodeParams , ok := prefillKVParams [requestFieldP2PDecodeParams ].(map [string ]any )
120+ decodeParams , ok := prefillKVParams [requestFieldRemoteDecoder ].(map [string ]any )
120121 Expect (ok ).To (BeTrue ())
121- p2p , ok := prefillKVParams [requestFieldP2PParams ].(map [string ]any )
122+ p2p , ok := prefillKVParams [requestFieldRemoteKVSource ].(map [string ]any )
122123 Expect (ok ).To (BeTrue ())
123124 Expect (p2p [requestFieldKVRequestID ]).ToNot (BeEmpty ())
124125 Expect (p2p [requestFieldKVRequestID ]).ToNot (Equal (decodeParams [requestFieldKVRequestID ]))
125126 Expect (p2p [requestFieldRemoteHost ]).To (Equal ("10.9.9.9" ))
126127 Expect (p2p [requestFieldRemotePort ]).To (BeNumerically ("==" , p2pConnectorPort ))
127128
128- // Decode leg: prefill only, never prefill + p2p .
129+ // Decode leg: remote_prefiller only, never remote_kv_source .
129130 decodeReqs := testInfo .decodeHandler .GetCompletionRequests ()
130131 Expect (decodeReqs ).To (HaveLen (1 ))
131132 decodeKVParams , ok := decodeReqs [0 ][requestFieldKVTransferParams ].(map [string ]any )
132133 Expect (ok ).To (BeTrue ())
133- Expect (decodeKVParams ).To (HaveKey (requestFieldP2PPrefillParams ))
134- Expect (decodeKVParams ).ToNot (HaveKey (requestFieldP2PParams ))
134+ Expect (decodeKVParams ).To (HaveKey (requestFieldRemotePrefiller ))
135+ Expect (decodeKVParams ).ToNot (HaveKey (requestFieldRemoteKVSource ))
135136
136137 testInfo .cancelFn ()
137138 <- testInfo .stoppedCh
138139 })
139140
140- It ("should not add p2p to the prefill leg when the source is the prefiller itself" , func () {
141+ It ("should not add remote_kv_source params to the prefill leg when the source is the prefiller itself" , func () {
141142 proxyBaseAddr := testInfo .startProxy ()
142143
143144 prefillHostPort := testInfo .prefillBackend .URL [len ("http://" ):]
144145 // The source resolves to the selected prefiller - there is nothing to
145- // pull from itself, so the prefill leg carries decode only.
146+ // pull from itself, so the prefill leg carries remote_decoder only.
146147 sendRequest (proxyBaseAddr , map [string ]string {
147148 routing .PrefillEndpointHeader : prefillHostPort ,
148149 routing .KVCacheSourceHeader : prefillHostPort ,
@@ -155,8 +156,8 @@ var _ = Describe("P2P KV cache source header", func() {
155156 preq := testInfo .prefillHandler .GetCompletionRequests ()[0 ]
156157 prefillKVParams , ok := preq [requestFieldKVTransferParams ].(map [string ]any )
157158 Expect (ok ).To (BeTrue ())
158- Expect (prefillKVParams ).To (HaveKey (requestFieldP2PDecodeParams ))
159- Expect (prefillKVParams ).ToNot (HaveKey (requestFieldP2PParams ))
159+ Expect (prefillKVParams ).To (HaveKey (requestFieldRemoteDecoder ))
160+ Expect (prefillKVParams ).ToNot (HaveKey (requestFieldRemoteKVSource ))
160161
161162 testInfo .cancelFn ()
162163 <- testInfo .stoppedCh
@@ -200,7 +201,7 @@ var _ = Describe("P2P KV cache source header", func() {
200201 Expect (ok ).To (BeTrue ())
201202 // Only the sidecar-owned remote_kv_source key survives; the client's keys are gone.
202203 Expect (kvParams ).To (HaveLen (1 ))
203- p2p , ok := kvParams [requestFieldP2PParams ].(map [string ]any )
204+ p2p , ok := kvParams [requestFieldRemoteKVSource ].(map [string ]any )
204205 Expect (ok ).To (BeTrue ())
205206 Expect (p2p [requestFieldRemoteHost ]).To (Equal ("10.9.9.9" ))
206207
@@ -247,7 +248,7 @@ var _ = Describe("P2P KV cache source header", func() {
247248 for _ , dreq := range decodeReqs {
248249 kvParams , ok := dreq [requestFieldKVTransferParams ].(map [string ]any )
249250 Expect (ok ).To (BeTrue ())
250- p2p , ok := kvParams [requestFieldP2PParams ].(map [string ]any )
251+ p2p , ok := kvParams [requestFieldRemoteKVSource ].(map [string ]any )
251252 Expect (ok ).To (BeTrue ())
252253 ids = append (ids , p2p [requestFieldKVRequestID ])
253254 }
0 commit comments