We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b996cd commit 57687caCopy full SHA for 57687ca
1 file changed
apisix/plugins/ai-cache.lua
@@ -215,6 +215,12 @@ function _M.log(conf, ctx)
215
return
216
end
217
218
+ -- Early-MISS paths (body parse / protocol detect / hash failure) skip
219
+ -- key computation, so bail out if cache key fields are absent.
220
+ if not ctx.ai_cache_prompt_hash or not ctx.ai_cache_prompt_text then
221
+ return
222
+ end
223
+
224
local upstream_status = core.response.get_upstream_status(ctx) or ngx.status
225
if not upstream_status or upstream_status < 200 or upstream_status >= 300 then
226
0 commit comments