fix: default auth to Bearer token (riotpiao gateway uses JWT now)

This commit is contained in:
2026-08-30 18:02:25 -07:00
parent 343a4f224f
commit 96ae855d35
2 changed files with 646 additions and 12 deletions
+3 -12
View File
@@ -38,18 +38,9 @@ impl AuthMode {
if api_key.is_empty() {
return Self::None;
}
// OpenRouter, OpenAI, Anthropic, Together, etc. use Bearer
if base_url.contains("openrouter.ai")
|| base_url.contains("api.openai.com")
|| base_url.contains("api.anthropic.com")
|| base_url.contains("api.together.xyz")
|| base_url.contains("api.groq.com")
{
Self::Bearer
} else {
// Default: apikey header (riotpiao gateway)
Self::ApiKeyHeader
}
// Bearer is the standard for OpenAI-compatible APIs
// including riotpiao gateway (JWT/OAuth), OpenRouter, OpenAI, etc.
Self::Bearer
}
}