openai: add 'timeout' to allowable x-stainless headers (#9237)

This commit is contained in:
Lucas Hahn 2025-02-20 00:56:18 -05:00 committed by GitHub
parent bda4ef6c56
commit 351a85d9ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1131,7 +1131,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", "retry-count", "runtime", "runtime-version", "async", "helper-method", "poll-helper", "custom-poll-interval"}
openAIProperties := []string{"lang", "package-version", "os", "arch", "retry-count", "runtime", "runtime-version", "async", "helper-method", "poll-helper", "custom-poll-interval", "timeout"}
for _, prop := range openAIProperties {
config.AllowHeaders = append(config.AllowHeaders, "x-stainless-"+prop)
}