apisix icon indicating copy to clipboard operation
apisix copied to clipboard

fix(ai-proxy): correct logging schema key in ai-proxy-multi

Open yixianOu opened this issue 1 month ago • 2 comments

Description

This PR unifies the schema definition in the ai-proxy-multi plugin. Previously, the ai_proxy_multi_schema used logging_schema as the key name, which was inconsistent with the ai-proxy plugin (which uses logging). This change ensures the logging configuration key is consistent across AI proxy plugins.

Checklist

  • [x] I have unified the schema key.

Related Issue

Fixes #12671

Signed-off-by: Orician [email protected]

yixianOu avatar Dec 06 '25 14:12 yixianOu


Test Summary Report
-------------------
t/plugin/mcp-bridge.t        (Wstat: 0 Tests: 10 Failed: 3)
  Failed tests:  7-9
  Parse errors: No plan found in TAP output
Files=5, Tests=182, 56 wallclock secs ( 0.04 usr  0.01 sys +  4.80 cusr  2.30 csys =  7.15 CPU)
Result: FAIL

I don't know why the mcp-bridge test failed, it should have nothing to do with my modification.

yixianOu avatar Dec 08 '25 13:12 yixianOu

Test Summary Report
-------------------
t/plugin/mcp-bridge.t        (Wstat: 0 Tests: 10 Failed: 3)
  Failed tests:  7-9
  Parse errors: No plan found in TAP output
Files=5, Tests=182, 56 wallclock secs ( 0.04 usr  0.01 sys +  4.80 cusr  2.30 csys =  7.15 CPU)
Result: FAIL

I don't know why the mcp-bridge test failed, it should have nothing to do with my modification.

Ignoring this test for now, the same issue exists in other PRs.

Baoyuantop avatar Dec 09 '25 02:12 Baoyuantop

We need to add additional tests to check the schema configuration in order to avoid encountering similar issues again.

Hi @yixianOu, could you add a simple test case?

Baoyuantop avatar Dec 12 '25 06:12 Baoyuantop

We need to add additional tests to check the schema configuration in order to avoid encountering similar issues again.

Hi @yixianOu, could you add a simple test case?

ok

yixianOu avatar Dec 12 '25 09:12 yixianOu

add additional tests to check the schema configuration

yixianOu avatar Dec 13 '25 11:12 yixianOu

https://github.com/apache/apisix/actions/runs/20191178102/job/58038560408?pr=12795 CI Test Failure Analysis :

  • Failed test: TEST 15 "add plugin with algorithm nanoid" in t/plugin/request-id.t
  • Failure cause: Duplicate IDs occurred when generating 180 nanoids concurrently, leading to test output "ids not unique" instead of the expected "true"
  • Connection to my code changes:
    • ❌ My changes didn’t affect this test. I only modified:
      • apisix/plugins/ai-proxy/schema.lua (renamed field: logging_schema → logging)
      • t/plugin/ai-proxy*.t (AI-proxy test files)
      • .gitignore
    • ✅ Neither request-id.t nor apisix/plugins/request-id.lua was modified
  • Possible root cause:
    • This is an intermittent test failure, usually caused by:
      • Duplicate randomness in the nanoid library under specific concurrent conditions
      • Timing issues due to CI environment resource limits
      • Behavior of LuaJIT’s random number generator at high concurrency
    • The issue isn’t caused by my changes but by pre-existing CI instability

yixianOu avatar Dec 15 '25 16:12 yixianOu

confirmed again, this is a bug, current way is right

membphis avatar Dec 18 '25 03:12 membphis