diff --git a/kong/llm/drivers/shared.lua b/kong/llm/drivers/shared.lua index 03124ee2e69d..9cd1a0404db6 100644 --- a/kong/llm/drivers/shared.lua +++ b/kong/llm/drivers/shared.lua @@ -448,7 +448,7 @@ function _M.pre_request(conf, request_table) -- log tokens prompt for reports and billing local prompt_tokens, err = self:calculate_cost(request_table, {}, 1.0) - kong.ctx.shared.ai_reponse_tokens = (kong.ctx.shared.ai_reponse_tokens or 0) + prompt_tokens + kong.ctx.shared.ai_prompt_tokens = (kong.ctx.shared.ai_prompt_tokens or 0) + prompt_tokens return true, nil end