shreemaan-abhishek opened a new pull request, #14139:
URL: https://github.com/apache/apisix/pull/14139

   ### Description\n\nThe two prompt plugins used separate request-body and 
message schemas, which allowed malformed prompt items and caused 
protocol-specific fields to be handled as OpenAI Chat messages. This change 
introduces shared strict prompt/body helpers, renders templates structurally so 
quotes, newlines, and markup remain valid JSON, and decorates OpenAI Chat, 
OpenAI Responses, Anthropic Messages, and Bedrock Converse requests in their 
native fields.\n\nUnsupported request formats can now be handled with 
fail_mode; oversized bodies return 413; rendered prompt bodies are no longer 
logged by template processing. Existing valid configurations remain compatible, 
while empty prompt arrays and non-object prompt entries are now rejected 
instead of being accepted as ineffective configuration.\n\n#### Which issue(s) 
this PR fixes:\n\nN/A\n\n### Validation\n\n- prove -I. 
t/plugin/ai-prompt-template.t\n- prove -I. t/plugin/ai-prompt-decorator.t\n- 
luacheck on all changed Lua modules\n-
  Compared Anthropic system-message behavior with current LiteLLM 
transformation behavior\n\n### Checklist\n\n- [x] I have explained the need for 
this PR and the problem it solves\n- [x] I have explained the changes or the 
new features added to this PR\n- [x] I have added tests corresponding to this 
change\n- [x] I have updated the documentation to reflect this change\n- [x] I 
have verified that this change is backward compatible for valid configurations


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to