adaptor.go
22.7 KB
-
fix: add Azure channel support for /v1/responses/compact URL routing (#4149) · 3ab65a82
The Azure channel's GetRequestURL method only handled RelayModeResponses but missed RelayModeResponsesCompact. This caused compact requests to fall through to the generic deployments URL pattern, producing an incorrect path that Azure returns 404 for. This fix extends the existing responses API special handling to also cover the compact mode, appending /compact to the subUrl when the relay mode is ResponsesCompact. Affected URLs (before → after): - Normal Azure: /openai/deployments/{model}/responses/compact → /openai/v1/responses/compact - cognitiveservices: same pattern → /openai/responses/compact - Custom AzureResponsesVersion: properly respected for compact too Co-authored-by: 彭俊杰 <pengjunjie@onero.com>woan1136 committed