mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 21:57:14 +08:00
feat(openai): inject app attribution headers for OpenRouter and Vercel AI Gateway
This commit is contained in:
@@ -422,8 +422,9 @@ class _AzureChatHTTPClient(OpenAIHTTPClient):
|
||||
)
|
||||
self._api_version = api_version
|
||||
|
||||
def _build_headers(self, api_key, extra_headers):
|
||||
# Azure uses api-key header, not Bearer token.
|
||||
def _build_headers(self, api_key, extra_headers, url=None):
|
||||
# Azure uses api-key header, not Bearer token. No attribution
|
||||
# headers — Azure deployments are the customer's own tenant.
|
||||
key = api_key if api_key is not None else self.api_key
|
||||
headers = {"Content-Type": "application/json"}
|
||||
if key:
|
||||
|
||||
Reference in New Issue
Block a user