Skip to content

Conversation

@Revolyssup
Copy link
Contributor

@Revolyssup Revolyssup commented Aug 27, 2025

Description

When user use access log in json format and specify $llm_prompt_tokens without the ai plugin enabled. It is replaced by empty causing json invalidation.

Access log before fix

{"@timestamp": "2025-04-08T16:21:05+05:30", "client_ip": "127.0.0.1", "status": "404", "llm_prompt_tokens": }

After fix

{"@timestamp": "2025-04-08T16:21:52+05:30", "client_ip": "127.0.0.1", "status": "404", "llm_prompt_tokens": 0}

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Aug 27, 2025
nic-6443
nic-6443 previously approved these changes Aug 28, 2025
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
@Baoyuantop Baoyuantop merged commit 6dd7664 into apache:master Aug 29, 2025
30 of 31 checks passed
jizhuozhi pushed a commit to jizhuozhi/apisix that referenced this pull request Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants