Skip to content

Commit

Permalink
feat(llm): recreate http request header and body when balancer retry
Browse files Browse the repository at this point in the history
  • Loading branch information
oowl committed Dec 11, 2024
1 parent ea6b35f commit 3e7c563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kong/llm/plugin/base.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local deflate_gzip = require("kong.tools.gzip").deflate_gzip
local ai_plugin_ctx = require("kong.llm.plugin.ctx")
local balancer = require("ngx.balancer")

local get_global_ctx, _ = ai_plugin_ctx.get_global_accessors("_base")

Expand Down Expand Up @@ -93,6 +94,7 @@ end

function MetaPlugin:retry(sub_plugin, conf)
run_stage(STAGES.REQ_TRANSFORMATION, sub_plugin, conf)
balancer.recreate_request()
end

function MetaPlugin:rewrite(sub_plugin, conf)
Expand Down

0 comments on commit 3e7c563

Please sign in to comment.