mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-05-05 17:56:56 +00:00
Add one-off database inspection and cleanup scripts under `scripts/scratch/` for local debugging and maintenance work. Document root cleanliness and file placement expectations for AI assistants in `GEMINI.md` to keep temporary scripts and tests out of the project root.
23 lines
952 B
TypeScript
23 lines
952 B
TypeScript
import {
|
|
APIKEY_PROVIDERS,
|
|
SEARCH_PROVIDERS,
|
|
AUDIO_ONLY_PROVIDERS,
|
|
WEB_COOKIE_PROVIDERS,
|
|
} from "./src/shared/constants/providers";
|
|
|
|
console.log("SEARCH_PROVIDERS", !!SEARCH_PROVIDERS, Object.keys(SEARCH_PROVIDERS || {}));
|
|
console.log("AUDIO_ONLY", !!AUDIO_ONLY_PROVIDERS);
|
|
console.log("WEB_COOKIE", !!WEB_COOKIE_PROVIDERS);
|
|
|
|
// Determine auth type group for a provider id
|
|
function getAuthGroup(providerId: string) {
|
|
if (WEB_COOKIE_PROVIDERS && WEB_COOKIE_PROVIDERS[providerId]) return "web-cookie";
|
|
if (SEARCH_PROVIDERS && SEARCH_PROVIDERS[providerId]) return "search";
|
|
if (AUDIO_ONLY_PROVIDERS && AUDIO_ONLY_PROVIDERS[providerId]) return "audio";
|
|
if (APIKEY_PROVIDERS && APIKEY_PROVIDERS[providerId]) return "apikey";
|
|
return "apikey";
|
|
}
|
|
|
|
console.log("grok-web returns:", getAuthGroup("grok-web"));
|
|
console.log("perplexity-search returns:", getAuthGroup("perplexity-search"));
|
|
console.log("openai returns:", getAuthGroup("openai"));
|