fix: default auth to Bearer token (riotpiao gateway uses JWT now)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user