Skip to content

bug: ai plugin uses the wrong key to decide whether to enable #8231

Description

@tzssangglass

Current Behavior

  1. elseif key == "filter_fun"then
    route_flags["filter_fun"] = true

filter_fun should be filter_func

If filter_func is enabled on the route and other conditions are met for the ai plugin to be enabled, the route matches are cached instead of filter_func.

  1. elseif k == "keepalive" then
    route_up_flags["keepalive"] = true

keepalive should be keepalive_pool

This will cause the keepalive_pool configured in upstream to not take effect, using the default keepalive_pool configuration.

Expected Behavior

null

Error Logs

null

Steps to Reproduce

null

Environment

  • APISIX version (run apisix version): master
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions