Skip to content

Commit e94ac43

Browse files
authored
fix(ai-proxy): fix openai provider customPath compatibility (#2475)
Signed-off-by: Xijun Dai <[email protected]>
1 parent dd29267 commit e94ac43

File tree

1 file changed

+1
-3
lines changed
  • plugins/wasm-go/extensions/ai-proxy/provider

1 file changed

+1
-3
lines changed

plugins/wasm-go/extensions/ai-proxy/provider/openai.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ func (m *openaiProvider) OnRequestHeaders(ctx wrapper.HttpContext, apiName ApiNa
120120
func (m *openaiProvider) TransformRequestHeaders(ctx wrapper.HttpContext, apiName ApiName, headers http.Header) {
121121
if m.isDirectCustomPath {
122122
util.OverwriteRequestPathHeader(headers, m.customPath)
123-
}
124-
125-
if apiName != "" {
123+
} else if apiName != "" {
126124
util.OverwriteRequestPathHeaderByCapability(headers, string(apiName), m.config.capabilities)
127125
}
128126

0 commit comments

Comments
 (0)