Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/bimwerxnz_ai9.json
T

1 line
9.8 KiB
JSON

{"repo": "bimwerxnz/ai9", "files": {"src/server/env.server.ts": {"e46169d17d4416d7c6fc8d297c68eb3a88ba6072": {"t": 1785745574.3293624, "n": 4720, "h": "f3dd834e47802f47", "c": "/**\n * Server-side environment variables centralized access and validation.\n * Replaced with env.client-mock.ts on client builds via webpack.\n */\n// [client-side] throw immediately if imported\nif (typeof window !== 'undefined')\n throw new Error('[DEV] env.server: server module should never be imported on the client.');\n\n// noinspection ES6PreferShortImport - because this is included by `next.config.ts` and build would not find this file with ~/...\nimport { createEnv } from '../modules/3rdparty/t3-env';\nimport * as z from 'zod/v4';\n\n\n// Helper to make some variables required only in production\nconst isProd = process.env.NODE_ENV === 'production' // True on Vercel and local builds, false on local dev\n && process.env.NEXT_PUBLIC_VERCEL_TARGET_ENV !== 'preview'; // False on Vercel dev-branch builds ('production' and 'staging' environments are treated as prod)\nconst requireOnProd = isProd ? z.string() : z.string().optional();\n\n\nexport const env = createEnv({\n\n /*\n * Serverside Environment variables, not available on the client.\n * Will throw if you access these variables on the client.\n */\n server: {\n\n // Backend Postgres, for optional storage via Prisma\n POSTGRES_PRISMA_URL: z.string().optional(),\n POSTGRES_URL_NON_POOLING: z.string().optional(),\n // Backend MongoDB, for a more complete developer data platform.\n MDB_URI: z.string().optional(),\n\n\n // LLM: OpenAI\n OPENAI_API_KEY: z.string().optional(),\n OPENAI_API_HOST: z.url().optional(),\n OPENAI_API_ORG_ID: z.string().optional(),\n\n // LLM: Alibaba (OpenAI)\n ALIBABA_API_HOST: z.url().optional(),\n ALIBABA_API_KEY: z.string().optional(),\n\n // LLM: Azure OpenAI\n AZURE_OPENAI_API_ENDPOINT: z.url().optional(),\n AZURE_OPENAI_API_KEY: z.string().optional(),\n // The following do not need to be set\n AZURE_OPENAI_DISABLE_V1: z.string().optional(), // next-gen API is active by default, default: false\n AZURE_OPENAI_API_VERSION: z.string().optional(), // traditional API still used for non-response models, default: '2025-04-01-preview'\n AZURE_DEPLOYMENTS_API_VERSION: z.string().optional(), // default: '2023-03-15-preview'\n\n // LLM: Anthropic\n ANTHROPIC_API_KEY: z.string().optional(),\n ANTHROPIC_API_HOST: z.url().optional(),\n\n // LLM: Deepseek AI\n DEEPSEEK_API_KEY: z.string().optional(),\n\n // LLM: Google AI's Gemini\n GEMINI_API_KEY: z.string().optional(),\n\n // LLM: Groq\n GROQ_API_KEY: z.string().optional(),\n\n // LLM: LocalAI\n LOCALAI_API_HOST: z.url().optional(),\n LOCALAI_API_KEY: z.string().optional(),\n\n // LLM: Mistral\n MISTRAL_API_KEY: z.string().optional(),\n\n // LLM: Moonshot AI\n MOONSHOT_API_KEY: z.string().optional(),\n\n // LLM: Ollama\n OLLAMA_API_HOST: z.url().optional(),\n\n // LLM: OpenPipe\n OPENPIPE_API_KEY: z.string().optional(),\n\n // LLM: OpenRouter\n OPENROUTER_API_KEY: z.string().optional(),\n\n // LLM: Perplexity\n PERPLEXITY_API_KEY: z.string().optional(),\n\n // LLM: Together AI\n TOGETHERAI_API_KEY: z.string().optional(),\n\n // LLM: xAI\n XAI_API_KEY: z.string().optional(),\n\n\n // Helicone - works on both OpenAI and Anthropic vendors\n HELICONE_API_KEY: z.string().optional(),\n\n\n // Browsing Service\n PUPPETEER_WSS_ENDPOINT: z.url().optional(),\n\n // Google Custom Search\n GOOGLE_CLOUD_API_KEY: z.string().optional(),\n GOOGLE_CSE_ID: z.string().optional(),\n\n\n // Text-To-Speech: ElevenLabs - speech.ts\n ELEVENLABS_API_KEY: z.string().optional(),\n ELEVENLABS_API_HOST: z.url().optional(),\n ELEVENLABS_VOICE_ID: z.string().optional(),\n\n\n // Backend: HTTP Basic Authentication\n HTTP_BASIC_AUTH_USERNAME: z.string().optional(),\n HTTP_BASIC_AUTH_PASSWORD: z.string().optional(),\n\n // Build-time configuration (ignore)\n BIG_AGI_BUILD: z.enum(['standalone', 'static']).optional(),\n\n },\n\n /*\n * Environment variables available on the client (and server).\n * You'll get type errors if these are not prefixed with NEXT_PUBLIC_.\n *\n * NOTE: they must be set at build time, not runtime(!)\n */\n client: {\n\n // Frontend: Google Analytics GA4 Measurement ID\n NEXT_PUBLIC_GA4_MEASUREMENT_ID: z.string().optional(),\n\n // Frontend: server to use for PlantUML rendering\n NEXT_PUBLIC_PLANTUML_SERVER_URL: z.url().optional(),\n\n },\n\n // matches user expectations - see https://github.com/enricoros/big-AGI/issues/279\n emptyStringAsUndefined: true,\n\n // with Noext.JS >= 13.4.4 we'd only need to destructure client variables\n experimental__runtimeEnv: {\n NEXT_PUBLIC_GA4_MEASUREMENT_ID: process.env.NEXT_PUBLIC_GA4_MEASUREMENT_ID,\n NEXT_PUBLIC_PLANTUML_SERVER_URL: process.env.NEXT_PUBLIC_PLANTUML_SERVER_URL,\n },\n});\n\n"}, "2ed718439d10111e5d66d1ed8e182c7d7f27c566": {"t": 1785754372.4349263, "n": 4720, "h": "f3dd834e47802f47", "c": "/**\n * Server-side environment variables centralized access and validation.\n * Replaced with env.client-mock.ts on client builds via webpack.\n */\n// [client-side] throw immediately if imported\nif (typeof window !== 'undefined')\n throw new Error('[DEV] env.server: server module should never be imported on the client.');\n\n// noinspection ES6PreferShortImport - because this is included by `next.config.ts` and build would not find this file with ~/...\nimport { createEnv } from '../modules/3rdparty/t3-env';\nimport * as z from 'zod/v4';\n\n\n// Helper to make some variables required only in production\nconst isProd = process.env.NODE_ENV === 'production' // True on Vercel and local builds, false on local dev\n && process.env.NEXT_PUBLIC_VERCEL_TARGET_ENV !== 'preview'; // False on Vercel dev-branch builds ('production' and 'staging' environments are treated as prod)\nconst requireOnProd = isProd ? z.string() : z.string().optional();\n\n\nexport const env = createEnv({\n\n /*\n * Serverside Environment variables, not available on the client.\n * Will throw if you access these variables on the client.\n */\n server: {\n\n // Backend Postgres, for optional storage via Prisma\n POSTGRES_PRISMA_URL: z.string().optional(),\n POSTGRES_URL_NON_POOLING: z.string().optional(),\n // Backend MongoDB, for a more complete developer data platform.\n MDB_URI: z.string().optional(),\n\n\n // LLM: OpenAI\n OPENAI_API_KEY: z.string().optional(),\n OPENAI_API_HOST: z.url().optional(),\n OPENAI_API_ORG_ID: z.string().optional(),\n\n // LLM: Alibaba (OpenAI)\n ALIBABA_API_HOST: z.url().optional(),\n ALIBABA_API_KEY: z.string().optional(),\n\n // LLM: Azure OpenAI\n AZURE_OPENAI_API_ENDPOINT: z.url().optional(),\n AZURE_OPENAI_API_KEY: z.string().optional(),\n // The following do not need to be set\n AZURE_OPENAI_DISABLE_V1: z.string().optional(), // next-gen API is active by default, default: false\n AZURE_OPENAI_API_VERSION: z.string().optional(), // traditional API still used for non-response models, default: '2025-04-01-preview'\n AZURE_DEPLOYMENTS_API_VERSION: z.string().optional(), // default: '2023-03-15-preview'\n\n // LLM: Anthropic\n ANTHROPIC_API_KEY: z.string().optional(),\n ANTHROPIC_API_HOST: z.url().optional(),\n\n // LLM: Deepseek AI\n DEEPSEEK_API_KEY: z.string().optional(),\n\n // LLM: Google AI's Gemini\n GEMINI_API_KEY: z.string().optional(),\n\n // LLM: Groq\n GROQ_API_KEY: z.string().optional(),\n\n // LLM: LocalAI\n LOCALAI_API_HOST: z.url().optional(),\n LOCALAI_API_KEY: z.string().optional(),\n\n // LLM: Mistral\n MISTRAL_API_KEY: z.string().optional(),\n\n // LLM: Moonshot AI\n MOONSHOT_API_KEY: z.string().optional(),\n\n // LLM: Ollama\n OLLAMA_API_HOST: z.url().optional(),\n\n // LLM: OpenPipe\n OPENPIPE_API_KEY: z.string().optional(),\n\n // LLM: OpenRouter\n OPENROUTER_API_KEY: z.string().optional(),\n\n // LLM: Perplexity\n PERPLEXITY_API_KEY: z.string().optional(),\n\n // LLM: Together AI\n TOGETHERAI_API_KEY: z.string().optional(),\n\n // LLM: xAI\n XAI_API_KEY: z.string().optional(),\n\n\n // Helicone - works on both OpenAI and Anthropic vendors\n HELICONE_API_KEY: z.string().optional(),\n\n\n // Browsing Service\n PUPPETEER_WSS_ENDPOINT: z.url().optional(),\n\n // Google Custom Search\n GOOGLE_CLOUD_API_KEY: z.string().optional(),\n GOOGLE_CSE_ID: z.string().optional(),\n\n\n // Text-To-Speech: ElevenLabs - speech.ts\n ELEVENLABS_API_KEY: z.string().optional(),\n ELEVENLABS_API_HOST: z.url().optional(),\n ELEVENLABS_VOICE_ID: z.string().optional(),\n\n\n // Backend: HTTP Basic Authentication\n HTTP_BASIC_AUTH_USERNAME: z.string().optional(),\n HTTP_BASIC_AUTH_PASSWORD: z.string().optional(),\n\n // Build-time configuration (ignore)\n BIG_AGI_BUILD: z.enum(['standalone', 'static']).optional(),\n\n },\n\n /*\n * Environment variables available on the client (and server).\n * You'll get type errors if these are not prefixed with NEXT_PUBLIC_.\n *\n * NOTE: they must be set at build time, not runtime(!)\n */\n client: {\n\n // Frontend: Google Analytics GA4 Measurement ID\n NEXT_PUBLIC_GA4_MEASUREMENT_ID: z.string().optional(),\n\n // Frontend: server to use for PlantUML rendering\n NEXT_PUBLIC_PLANTUML_SERVER_URL: z.url().optional(),\n\n },\n\n // matches user expectations - see https://github.com/enricoros/big-AGI/issues/279\n emptyStringAsUndefined: true,\n\n // with Noext.JS >= 13.4.4 we'd only need to destructure client variables\n experimental__runtimeEnv: {\n NEXT_PUBLIC_GA4_MEASUREMENT_ID: process.env.NEXT_PUBLIC_GA4_MEASUREMENT_ID,\n NEXT_PUBLIC_PLANTUML_SERVER_URL: process.env.NEXT_PUBLIC_PLANTUML_SERVER_URL,\n },\n});\n\n"}}}}