mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
feat: add support for Grok Web and Perplexity Web providers
This commit is contained in:
@@ -61,6 +61,7 @@ export {
|
||||
FREE_PROVIDERS,
|
||||
OAUTH_PROVIDERS,
|
||||
APIKEY_PROVIDERS,
|
||||
WEB_COOKIE_PROVIDERS,
|
||||
AI_PROVIDERS,
|
||||
AUTH_METHODS,
|
||||
} from "./providers.js";
|
||||
|
||||
@@ -99,6 +99,12 @@ export const APIKEY_PROVIDERS = {
|
||||
firecrawl: { id: "firecrawl", alias: "firecrawl", name: "Firecrawl", icon: "local_fire_department", color: "#F59E0B", textIcon: "FC", website: "https://firecrawl.dev", serviceKinds: ["webFetch"] },
|
||||
};
|
||||
|
||||
// Web Cookie Providers (use browser session cookie instead of API key)
|
||||
export const WEB_COOKIE_PROVIDERS = {
|
||||
"grok-web": { id: "grok-web", alias: "gw", name: "Grok Web (Subscription)", icon: "auto_awesome", color: "#1DA1F2", textIcon: "GW", website: "https://grok.com", authType: "cookie", authHint: "Paste your sso= cookie value from grok.com", passthroughModels: true, serviceKinds: ["llm"] },
|
||||
"perplexity-web": { id: "perplexity-web", alias: "pw", name: "Perplexity Web (Pro/Max)", icon: "search", color: "#20808D", textIcon: "PW", website: "https://www.perplexity.ai", authType: "cookie", authHint: "Paste your __Secure-next-auth.session-token cookie value from perplexity.ai", serviceKinds: ["llm"] },
|
||||
};
|
||||
|
||||
// Media provider kinds — each kind maps to a route and endpoint config
|
||||
export const MEDIA_PROVIDER_KINDS = [
|
||||
{ id: "embedding", label: "Embedding", icon: "data_array", endpoint: { method: "POST", path: "/v1/embeddings" } },
|
||||
@@ -124,12 +130,13 @@ export function isAnthropicCompatibleProvider(providerId) {
|
||||
}
|
||||
|
||||
// All providers (combined)
|
||||
export const AI_PROVIDERS = { ...FREE_PROVIDERS, ...FREE_TIER_PROVIDERS, ...OAUTH_PROVIDERS, ...APIKEY_PROVIDERS };
|
||||
export const AI_PROVIDERS = { ...FREE_PROVIDERS, ...FREE_TIER_PROVIDERS, ...OAUTH_PROVIDERS, ...APIKEY_PROVIDERS, ...WEB_COOKIE_PROVIDERS };
|
||||
|
||||
// Auth methods
|
||||
export const AUTH_METHODS = {
|
||||
oauth: { id: "oauth", name: "OAuth", icon: "lock" },
|
||||
apikey: { id: "apikey", name: "API Key", icon: "key" },
|
||||
cookie: { id: "cookie", name: "Browser Cookie", icon: "cookie" },
|
||||
};
|
||||
|
||||
// Helper: Get provider by alias
|
||||
|
||||
Reference in New Issue
Block a user