feat: allow overriding provider headers (#2161)

This commit is contained in:
Avinash Thakur
2025-06-07 23:34:00 +05:30
committed by GitHub
parent 86489ef2be
commit 8396cc77e4
12 changed files with 24 additions and 23 deletions

View File

@@ -309,7 +309,7 @@ function M:parse_curl_args(prompt_opts)
),
proxy = provider_conf.proxy,
insecure = provider_conf.allow_insecure,
headers = { ["Content-Type"] = "application/json" },
headers = Utils.tbl_override({ ["Content-Type"] = "application/json" }, self.extra_headers),
body = M.prepare_request_body(self, prompt_opts, provider_conf, request_body),
}
end