feat: Add OpenRouter chat completion provider adapter with custom headers. (#6436)

This commit is contained in:
Futureppo
2026-03-16 19:11:43 +08:00
committed by GitHub
parent 3fbd16b211
commit c42ac87ee1
@@ -16,4 +16,7 @@ class ProviderOpenRouter(ProviderOpenAIOfficial):
self.client._custom_headers["HTTP-Referer"] = ( # type: ignore
"https://github.com/AstrBotDevs/AstrBot"
)
self.client._custom_headers["X-TITLE"] = "AstrBot" # type: ignore
self.client._custom_headers["X-OpenRouter-Title"] = "AstrBot" # type: ignore
self.client._custom_headers["X-OpenRouter-Categories"] = (
"general-chat,personal-agent" # type: ignore
)