openai: accept X-Stainless-Retry-Count header (#6910)

This commit is contained in:
oza6ut0ne 2024-11-24 05:39:05 +09:00 committed by GitHub
parent 78f779a323
commit 31cb1ca9e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1141,7 +1141,7 @@ func (s *Server) GenerateRoutes() http.Handler {
config.AllowWildcard = true
config.AllowBrowserExtensions = true
config.AllowHeaders = []string{"Authorization", "Content-Type", "User-Agent", "Accept", "X-Requested-With"}
openAIProperties := []string{"lang", "package-version", "os", "arch", "runtime", "runtime-version", "async"}
openAIProperties := []string{"lang", "package-version", "os", "arch", "retry-count", "runtime", "runtime-version", "async"}
for _, prop := range openAIProperties {
config.AllowHeaders = append(config.AllowHeaders, "x-stainless-"+prop)
}