sihyeonn opened a new pull request, #12857: URL: https://github.com/apache/apisix/pull/12857
### Description Add `override.path_mode` option to `ai-proxy` and `ai-proxy-multi` plugins to control how the upstream request path is determined. **Background (Problem)** Currently, when `override.endpoint` is set, the URL path is fixed to either the endpoint's path or the driver's default path. This causes issues when: - Using a single route for multiple API endpoints (e.g., `/v1/chat/completions` and `/v1/responses`) - Wanting to preserve the original request URI path while only overriding the host **Solution** Add `path_mode` option with three modes: - `fixed` (default): Existing behavior - uses endpoint path or driver default - `preserve`: Uses the original request URI path (with query string) - `append`: Appends original request URI path to the endpoint path This allows using a single route with the same model for multiple API endpoints, reducing route explosion in multi-model deployments. #### Which issue(s) this PR fixes: Fixes # ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [x] I have added tests corresponding to this change - [ ] I have updated the documentation to reflect this change - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first) -- 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]
