Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
openai: accept additional headers to fix CORS errors (#8343)
isamu arimoto6ae2adc1af91
diff --git a/server/routes.go b/server/routes.goindex 543b823d6..c2ec360ab 100644--- a/server/routes.go+++ b/server/routes.go@@ -1131,7 +1131,7 @@ func (s *Server) GenerateRoutes() http.Handler {config.AllowWildcard = trueconfig.AllowBrowserExtensions = trueconfig.AllowHeaders = []string{"Authorization", "Content-Type", "User-Agent", "Accept", "X-Requested-With"}- openAIProperties := []string{"lang", "package-version", "os", "arch", "retry-count", "runtime", "runtime-version", "async"}+ openAIProperties := []string{"lang", "package-version", "os", "arch", "retry-count", "runtime", "runtime-version", "async", "helper-method", "poll-helper", "custom-poll-interval"}for _, prop := range openAIProperties {config.AllowHeaders = append(config.AllowHeaders, "x-stainless-"+prop)}