Skip to content

bug: OpenAI pass though routes are forwarded with double /v1 prefix #176

@pawbana

Description

@pawbana

With default OpenAI base url https://api.openai.com/v1/ pass though routes have v1 prefix added 2 times, once from base URL (added in #159)

reqPath, err := url.JoinPath(upURL.Path, r.URL.Path)
and then from r.URL.Path which contains /v1 prefix
"/v1/conversations",
"/v1/conversations/",
"/v1/models",
"/v1/models/",
"/v1/responses/", // Forwards other responses API endpoints, eg: https://platform.openai.com/docs/api-reference/responses/get
that isn't stripped
mux.HandleFunc(route, http.StripPrefix(prefix, ftr).ServeHTTP)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions