AlinsRan commented on PR #13652:
URL: https://github.com/apache/apisix/pull/13652#issuecomment-4873129068

   Good catch. Bedrock Converse blocks use `{image=...}`/`{document=...}` with 
no `type`, so the OpenAI-only `type ~= "text"` check missed them and a Bedrock 
text+image request still collided with text-only at L1.
   
   Reworked the detector to be shape-agnostic: a block counts as text only if 
it has a string `text` and no non-text discriminator, covering both the OpenAI 
`type` tag and Bedrock's key-per-modality blocks. Added a Bedrock exact-cache 
regression (TEST 66-68) — text-only warms L1, same text + image is a MISS; 
reverting the detector reproduces the HIT, so the test bites.
   
   The access-phase guard bypasses before the fingerprint is computed, so this 
raw-body detection also covers the L1 canonicalization gap you pointed at — no 
key.lua change needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to