1 line
78 KiB
JSON
1 line
78 KiB
JSON
{"repo": "2447380040/lobe-chat-525", "files": {"Dockerfile": {"dd28a897c45e353c80b867121533705c619f09f9": {"t": 1785595545.002313, "n": 8506, "h": "0db60a30bcb4a62c", "c": "## Set global build ENV\nARG NODEJS_VERSION=\"22\"\n\n## Base image for all building stages\nFROM node:${NODEJS_VERSION}-slim AS base\n\nARG USE_CN_MIRROR\n\nENV DEBIAN_FRONTEND=\"noninteractive\"\n\nRUN \\\n # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true\n if [ \"${USE_CN_MIRROR:-false}\" = \"true\" ]; then \\\n sed -i \"s/deb.debian.org/mirrors.ustc.edu.cn/g\" \"/etc/apt/sources.list.d/debian.sources\"; \\\n fi \\\n # Add required package\n && apt update \\\n && apt install ca-certificates proxychains-ng -qy \\\n # Prepare required package to distroless\n && mkdir -p /distroless/bin /distroless/etc /distroless/etc/ssl/certs /distroless/lib \\\n # Copy proxychains to distroless\n && cp /usr/lib/$(arch)-linux-gnu/libproxychains.so.4 /distroless/lib/libproxychains.so.4 \\\n && cp /usr/lib/$(arch)-linux-gnu/libdl.so.2 /distroless/lib/libdl.so.2 \\\n && cp /usr/bin/proxychains4 /distroless/bin/proxychains \\\n && cp /etc/proxychains4.conf /distroless/etc/proxychains4.conf \\\n # Copy node to distroless\n && cp /usr/lib/$(arch)-linux-gnu/libstdc++.so.6 /distroless/lib/libstdc++.so.6 \\\n && cp /usr/lib/$(arch)-linux-gnu/libgcc_s.so.1 /distroless/lib/libgcc_s.so.1 \\\n && cp /usr/local/bin/node /distroless/bin/node \\\n # Copy CA certificates to distroless\n && cp /etc/ssl/certs/ca-certificates.crt /distroless/etc/ssl/certs/ca-certificates.crt \\\n # Cleanup temp files\n && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*\n\n## Builder image, install all the dependencies and build the app\nFROM base AS builder\n\nARG USE_CN_MIRROR\nARG NEXT_PUBLIC_BASE_PATH\nARG NEXT_PUBLIC_SENTRY_DSN\nARG NEXT_PUBLIC_ANALYTICS_POSTHOG\nARG NEXT_PUBLIC_POSTHOG_HOST\nARG NEXT_PUBLIC_POSTHOG_KEY\nARG NEXT_PUBLIC_ANALYTICS_UMAMI\nARG NEXT_PUBLIC_UMAMI_SCRIPT_URL\nARG NEXT_PUBLIC_UMAMI_WEBSITE_ID\nARG FEATURE_FLAGS\n\nENV NEXT_PUBLIC_BASE_PATH=\"${NEXT_PUBLIC_BASE_PATH}\" \\\n FEATURE_FLAGS=\"${FEATURE_FLAGS}\"\n# Sentry\nENV NEXT_PUBLIC_SENTRY_DSN=\"${NEXT_PUBLIC_SENTRY_DSN}\" \\\n SENTRY_ORG=\"\" \\\n SENTRY_PROJECT=\"\"\n\n# Posthog\nENV NEXT_PUBLIC_ANALYTICS_POSTHOG=\"${NEXT_PUBLIC_ANALYTICS_POSTHOG}\" \\\n NEXT_PUBLIC_POSTHOG_HOST=\"${NEXT_PUBLIC_POSTHOG_HOST}\" \\\n NEXT_PUBLIC_POSTHOG_KEY=\"${NEXT_PUBLIC_POSTHOG_KEY}\"\n\n# Umami\nENV NEXT_PUBLIC_ANALYTICS_UMAMI=\"${NEXT_PUBLIC_ANALYTICS_UMAMI}\" \\\n NEXT_PUBLIC_UMAMI_SCRIPT_URL=\"${NEXT_PUBLIC_UMAMI_SCRIPT_URL}\" \\\n NEXT_PUBLIC_UMAMI_WEBSITE_ID=\"${NEXT_PUBLIC_UMAMI_WEBSITE_ID}\"\n\n# Node\nENV NODE_OPTIONS=\"--max-old-space-size=8192\"\n\nWORKDIR /app\n\nCOPY package.json pnpm-workspace.yaml ./\nCOPY .npmrc ./\nCOPY packages ./packages\n\nRUN \\\n # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true\n if [ \"${USE_CN_MIRROR:-false}\" = \"true\" ]; then \\\n export SENTRYCLI_CDNURL=\"https://npmmirror.com/mirrors/sentry-cli\"; \\\n npm config set registry \"https://registry.npmmirror.com/\"; \\\n echo 'canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas' >> .npmrc; \\\n fi \\\n # Set the registry for corepack\n && export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\\/$//') \\\n # Update corepack to latest (nodejs/corepack#612)\n && npm i -g corepack@latest \\\n # Enable corepack\n && corepack enable \\\n # Use pnpm for corepack\n && corepack use $(sed -n 's/.*\"packageManager\": \"\\(.*\\)\".*/\\1/p' package.json) \\\n # Install the dependencies\n && pnpm i\n\nCOPY . .\n\n# run build standalone for docker version\nRUN npm run build:docker\n\n## Application image, copy all the files for production\nFROM busybox:latest AS app\n\nCOPY --from=base /distroless/ /\n\n# Automatically leverage output traces to reduce image size\n# https://nextjs.org/docs/advanced-features/output-file-tracing\nCOPY --from=builder /app/.next/standalone /app/\n\n# Copy server launcher\nCOPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js\n\nRUN \\\n # Add nextjs:nodejs to run the app\n addgroup -S -g 1001 nodejs \\\n && adduser -D -G nodejs -H -S -h /app -u 1001 nextjs \\\n # Set permission for nextjs:nodejs\n && chown -R nextjs:nodejs /app /etc/proxychains4.conf\n\n## Production image, copy all the files and run next\nFROM scratch\n\n# Copy all the files from app, set the correct permission for prerender cache\nCOPY --from=app / /\n\nENV NODE_ENV=\"production\" \\\n NODE_OPTIONS=\"--dns-result-order=ipv4first --use-openssl-ca\" \\\n NODE_EXTRA_CA_CERTS=\"\" \\\n NODE_TLS_REJECT_UNAUTHORIZED=\"\" \\\n SSL_CERT_DIR=\"/etc/ssl/certs/ca-certificates.crt\"\n\n# Make the middleware rewrite through local as default\n# refs: https://github.com/lobehub/lobe-chat/issues/5876\nENV MIDDLEWARE_REWRITE_THROUGH_LOCAL=\"1\"\n\n# set hostname to localhost\nENV HOSTNAME=\"0.0.0.0\" \\\n PORT=\"3210\"\n\n# General Variables\nENV ACCESS_CODE=\"\" \\\n API_KEY_SELECT_MODE=\"\" \\\n DEFAULT_AGENT_CONFIG=\"\" \\\n SYSTEM_AGENT=\"\" \\\n FEATURE_FLAGS=\"\" \\\n PROXY_URL=\"\"\n\n# Model Variables\nENV \\\n # AI21\n AI21_API_KEY=\"\" AI21_MODEL_LIST=\"\" \\\n # Ai360\n AI360_API_KEY=\"\" AI360_MODEL_LIST=\"\" \\\n # Anthropic\n ANTHROPIC_API_KEY=\"\" ANTHROPIC_MODEL_LIST=\"\" ANTHROPIC_PROXY_URL=\"\" \\\n # Amazon Bedrock\n AWS_ACCESS_KEY_ID=\"\" AWS_SECRET_ACCESS_KEY=\"\" AWS_REGION=\"\" AWS_BEDROCK_MODEL_LIST=\"\" \\\n # Azure OpenAI\n AZURE_API_KEY=\"\" AZURE_API_VERSION=\"\" AZURE_ENDPOINT=\"\" AZURE_MODEL_LIST=\"\" \\\n # Baichuan\n BAICHUAN_API_KEY=\"\" BAICHUAN_MODEL_LIST=\"\" \\\n # Cloudflare\n CLOUDFLARE_API_KEY=\"\" CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID=\"\" CLOUDFLARE_MODEL_LIST=\"\" \\\n # Cohere\n COHERE_API_KEY=\"\" COHERE_MODEL_LIST=\"\" COHERE_PROXY_URL=\"\" \\\n # DeepSeek\n DEEPSEEK_API_KEY=\"\" DEEPSEEK_MODEL_LIST=\"\" \\\n # Fireworks AI\n FIREWORKSAI_API_KEY=\"\" FIREWORKSAI_MODEL_LIST=\"\" \\\n # Gitee AI\n GITEE_AI_API_KEY=\"\" GITEE_AI_MODEL_LIST=\"\" \\\n # GitHub\n GITHUB_TOKEN=\"\" GITHUB_MODEL_LIST=\"\" \\\n # Google\n GOOGLE_API_KEY=\"\" GOOGLE_MODEL_LIST=\"\" GOOGLE_PROXY_URL=\"\" \\\n # Groq\n GROQ_API_KEY=\"\" GROQ_MODEL_LIST=\"\" GROQ_PROXY_URL=\"\" \\\n # Higress\n HIGRESS_API_KEY=\"\" HIGRESS_MODEL_LIST=\"\" HIGRESS_PROXY_URL=\"\" \\\n # HuggingFace\n HUGGINGFACE_API_KEY=\"\" HUGGINGFACE_MODEL_LIST=\"\" HUGGINGFACE_PROXY_URL=\"\" \\\n # Hunyuan\n HUNYUAN_API_KEY=\"\" HUNYUAN_MODEL_LIST=\"\" \\\n # InternLM\n INTERNLM_API_KEY=\"\" INTERNLM_MODEL_LIST=\"\" \\\n # Jina\n JINA_API_KEY=\"\" JINA_MODEL_LIST=\"\" JINA_PROXY_URL=\"\" \\\n # Minimax\n MINIMAX_API_KEY=\"\" MINIMAX_MODEL_LIST=\"\" \\\n # Mistral\n MISTRAL_API_KEY=\"\" MISTRAL_MODEL_LIST=\"\" \\\n # Moonshot\n MOONSHOT_API_KEY=\"\" MOONSHOT_MODEL_LIST=\"\" MOONSHOT_PROXY_URL=\"\" \\\n # Novita\n NOVITA_API_KEY=\"\" NOVITA_MODEL_LIST=\"\" \\\n # Nvidia NIM\n NVIDIA_API_KEY=\"\" NVIDIA_MODEL_LIST=\"\" NVIDIA_PROXY_URL=\"\" \\\n # Ollama\n ENABLED_OLLAMA=\"\" OLLAMA_MODEL_LIST=\"\" OLLAMA_PROXY_URL=\"\" \\\n # OpenAI\n OPENAI_API_KEY=\"\" OPENAI_MODEL_LIST=\"\" OPENAI_PROXY_URL=\"\" \\\n # OpenRouter\n OPENROUTER_API_KEY=\"\" OPENROUTER_MODEL_LIST=\"\" \\\n # Perplexity\n PERPLEXITY_API_KEY=\"\" PERPLEXITY_MODEL_LIST=\"\" PERPLEXITY_PROXY_URL=\"\" \\\n # PPIO\n PPIO_API_KEY=\"\" PPIO_MODEL_LIST=\"\" \\\n # Qiniu\n QINIU_API_KEY=\"\" QINIU_MODEL_LIST=\"\" QINIU_PROXY_URL=\"\" \\\n # Qwen\n QWEN_API_KEY=\"\" QWEN_MODEL_LIST=\"\" QWEN_PROXY_URL=\"\" \\\n # SambaNova\n SAMBANOVA_API_KEY=\"\" SAMBANOVA_MODEL_LIST=\"\" \\\n # Search1API\n SEARCH1API_API_KEY=\"\" SEARCH1API_MODEL_LIST=\"\" \\\n # SenseNova\n SENSENOVA_API_KEY=\"\" SENSENOVA_MODEL_LIST=\"\" \\\n # SiliconCloud\n SILICONCLOUD_API_KEY=\"\" SILICONCLOUD_MODEL_LIST=\"\" SILICONCLOUD_PROXY_URL=\"\" \\\n # Spark\n SPARK_API_KEY=\"\" SPARK_MODEL_LIST=\"\" SPARK_PROXY_URL=\"\" SPARK_SEARCH_MODE=\"\" \\\n # Stepfun\n STEPFUN_API_KEY=\"\" STEPFUN_MODEL_LIST=\"\" \\\n # Taichu\n TAICHU_API_KEY=\"\" TAICHU_MODEL_LIST=\"\" \\\n # TogetherAI\n TOGETHERAI_API_KEY=\"\" TOGETHERAI_MODEL_LIST=\"\" \\\n # Upstage\n UPSTAGE_API_KEY=\"\" UPSTAGE_MODEL_LIST=\"\" \\\n # vLLM\n VLLM_API_KEY=\"\" VLLM_MODEL_LIST=\"\" VLLM_PROXY_URL=\"\" \\\n # Wenxin\n WENXIN_API_KEY=\"\" WENXIN_MODEL_LIST=\"\" \\\n # xAI\n XAI_API_KEY=\"\" XAI_MODEL_LIST=\"\" XAI_PROXY_URL=\"\" \\\n # Xinference\n XINFERENCE_API_KEY=\"\" XINFERENCE_MODEL_LIST=\"\" XINFERENCE_PROXY_URL=\"\" \\\n # 01.AI\n ZEROONE_API_KEY=\"\" ZEROONE_MODEL_LIST=\"\" \\\n # Zhipu\n ZHIPU_API_KEY=\"\" ZHIPU_MODEL_LIST=\"\" \\\n # Tencent Cloud\n TENCENT_CLOUD_API_KEY=\"\" TENCENT_CLOUD_MODEL_LIST=\"\" \\\n # Infini-AI\n INFINIAI_API_KEY=\"\" INFINIAI_MODEL_LIST=\"\"\n\nUSER nextjs\n\nEXPOSE 3210/tcp\n\nENTRYPOINT [\"/bin/node\"]\n\nCMD [\"/app/startServer.js\"]\n"}}, "Dockerfile.pglite": {"dd28a897c45e353c80b867121533705c619f09f9": {"t": 1785595551.1465487, "n": 8420, "h": "ac19eb4edf9da662", "c": "## Set global build ENV\nARG NODEJS_VERSION=\"22\"\n\n## Base image for all building stages\nFROM node:${NODEJS_VERSION}-slim AS base\n\nARG USE_CN_MIRROR\n\nENV DEBIAN_FRONTEND=\"noninteractive\"\n\nRUN \\\n # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true\n if [ \"${USE_CN_MIRROR:-false}\" = \"true\" ]; then \\\n sed -i \"s/deb.debian.org/mirrors.ustc.edu.cn/g\" \"/etc/apt/sources.list.d/debian.sources\"; \\\n fi \\\n # Add required package\n && apt update \\\n && apt install ca-certificates proxychains-ng -qy \\\n # Prepare required package to distroless\n && mkdir -p /distroless/bin /distroless/etc /distroless/etc/ssl/certs /distroless/lib \\\n # Copy proxychains to distroless\n && cp /usr/lib/$(arch)-linux-gnu/libproxychains.so.4 /distroless/lib/libproxychains.so.4 \\\n && cp /usr/lib/$(arch)-linux-gnu/libdl.so.2 /distroless/lib/libdl.so.2 \\\n && cp /usr/bin/proxychains4 /distroless/bin/proxychains \\\n && cp /etc/proxychains4.conf /distroless/etc/proxychains4.conf \\\n # Copy node to distroless\n && cp /usr/lib/$(arch)-linux-gnu/libstdc++.so.6 /distroless/lib/libstdc++.so.6 \\\n && cp /usr/lib/$(arch)-linux-gnu/libgcc_s.so.1 /distroless/lib/libgcc_s.so.1 \\\n && cp /usr/local/bin/node /distroless/bin/node \\\n # Copy CA certificates to distroless\n && cp /etc/ssl/certs/ca-certificates.crt /distroless/etc/ssl/certs/ca-certificates.crt \\\n # Cleanup temp files\n && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*\n\n## Builder image, install all the dependencies and build the app\nFROM base AS builder\n\nARG USE_CN_MIRROR\nARG NEXT_PUBLIC_BASE_PATH\nARG NEXT_PUBLIC_SENTRY_DSN\nARG NEXT_PUBLIC_ANALYTICS_POSTHOG\nARG NEXT_PUBLIC_POSTHOG_HOST\nARG NEXT_PUBLIC_POSTHOG_KEY\nARG NEXT_PUBLIC_ANALYTICS_UMAMI\nARG NEXT_PUBLIC_UMAMI_SCRIPT_URL\nARG NEXT_PUBLIC_UMAMI_WEBSITE_ID\nARG FEATURE_FLAGS\n\nENV NEXT_PUBLIC_CLIENT_DB=\"pglite\"\nENV NEXT_PUBLIC_BASE_PATH=\"${NEXT_PUBLIC_BASE_PATH}\" \\\n FEATURE_FLAGS=\"${FEATURE_FLAGS}\"\n\n# Sentry\nENV NEXT_PUBLIC_SENTRY_DSN=\"${NEXT_PUBLIC_SENTRY_DSN}\" \\\n SENTRY_ORG=\"\" \\\n SENTRY_PROJECT=\"\"\n\n# Posthog\nENV NEXT_PUBLIC_ANALYTICS_POSTHOG=\"${NEXT_PUBLIC_ANALYTICS_POSTHOG}\" \\\n NEXT_PUBLIC_POSTHOG_HOST=\"${NEXT_PUBLIC_POSTHOG_HOST}\" \\\n NEXT_PUBLIC_POSTHOG_KEY=\"${NEXT_PUBLIC_POSTHOG_KEY}\"\n\n# Umami\nENV NEXT_PUBLIC_ANALYTICS_UMAMI=\"${NEXT_PUBLIC_ANALYTICS_UMAMI}\" \\\n NEXT_PUBLIC_UMAMI_SCRIPT_URL=\"${NEXT_PUBLIC_UMAMI_SCRIPT_URL}\" \\\n NEXT_PUBLIC_UMAMI_WEBSITE_ID=\"${NEXT_PUBLIC_UMAMI_WEBSITE_ID}\"\n\n# Node\nENV NODE_OPTIONS=\"--max-old-space-size=8192\"\n\nWORKDIR /app\n\nCOPY package.json pnpm-workspace.yaml ./\nCOPY .npmrc ./\nCOPY packages ./packages\n\nRUN \\\n # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true\n if [ \"${USE_CN_MIRROR:-false}\" = \"true\" ]; then \\\n export SENTRYCLI_CDNURL=\"https://npmmirror.com/mirrors/sentry-cli\"; \\\n npm config set registry \"https://registry.npmmirror.com/\"; \\\n echo 'canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas' >> .npmrc; \\\n fi \\\n # Set the registry for corepack\n && export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\\/$//') \\\n # Update corepack to latest (nodejs/corepack#612)\n && npm i -g corepack@latest \\\n # Enable corepack\n && corepack enable \\\n # Use pnpm for corepack\n && corepack use $(sed -n 's/.*\"packageManager\": \"\\(.*\\)\".*/\\1/p' package.json) \\\n # Install the dependencies\n && pnpm i\n\nCOPY . .\n\n# run build standalone for docker version\nRUN npm run build:docker\n\n## Application image, copy all the files for production\nFROM busybox:latest AS app\n\nCOPY --from=base /distroless/ /\n\n# Automatically leverage output traces to reduce image size\n# https://nextjs.org/docs/advanced-features/output-file-tracing\nCOPY --from=builder /app/.next/standalone /app/\n\n# Copy server launcher\nCOPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js\n\nRUN \\\n # Add nextjs:nodejs to run the app\n addgroup -S -g 1001 nodejs \\\n && adduser -D -G nodejs -H -S -h /app -u 1001 nextjs \\\n # Set permission for nextjs:nodejs\n && chown -R nextjs:nodejs /app /etc/proxychains4.conf\n\n## Production image, copy all the files and run next\nFROM scratch\n\n# Copy all the files from app, set the correct permission for prerender cache\nCOPY --from=app / /\n\nENV NODE_ENV=\"production\" \\\n NODE_OPTIONS=\"--dns-result-order=ipv4first --use-openssl-ca\" \\\n NODE_EXTRA_CA_CERTS=\"\" \\\n NODE_TLS_REJECT_UNAUTHORIZED=\"\" \\\n SSL_CERT_DIR=\"/etc/ssl/certs/ca-certificates.crt\"\n\n# Make the middleware rewrite through local as default\n# refs: https://github.com/lobehub/lobe-chat/issues/5876\nENV MIDDLEWARE_REWRITE_THROUGH_LOCAL=\"1\"\n\n# set hostname to localhost\nENV HOSTNAME=\"0.0.0.0\" \\\n PORT=\"3210\"\n\n# General Variables\nENV ACCESS_CODE=\"\" \\\n API_KEY_SELECT_MODE=\"\" \\\n DEFAULT_AGENT_CONFIG=\"\" \\\n SYSTEM_AGENT=\"\" \\\n FEATURE_FLAGS=\"\" \\\n PROXY_URL=\"\"\n\n# Model Variables\nENV \\\n # AI21\n AI21_API_KEY=\"\" AI21_MODEL_LIST=\"\" \\\n # Ai360\n AI360_API_KEY=\"\" AI360_MODEL_LIST=\"\" \\\n # Anthropic\n ANTHROPIC_API_KEY=\"\" ANTHROPIC_MODEL_LIST=\"\" ANTHROPIC_PROXY_URL=\"\" \\\n # Amazon Bedrock\n AWS_ACCESS_KEY_ID=\"\" AWS_SECRET_ACCESS_KEY=\"\" AWS_REGION=\"\" AWS_BEDROCK_MODEL_LIST=\"\" \\\n # Azure OpenAI\n AZURE_API_KEY=\"\" AZURE_API_VERSION=\"\" AZURE_ENDPOINT=\"\" AZURE_MODEL_LIST=\"\" \\\n # Baichuan\n BAICHUAN_API_KEY=\"\" BAICHUAN_MODEL_LIST=\"\" \\\n # Cloudflare\n CLOUDFLARE_API_KEY=\"\" CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID=\"\" CLOUDFLARE_MODEL_LIST=\"\" \\\n # Cohere\n COHERE_API_KEY=\"\" COHERE_MODEL_LIST=\"\" COHERE_PROXY_URL=\"\" \\\n # DeepSeek\n DEEPSEEK_API_KEY=\"\" DEEPSEEK_MODEL_LIST=\"\" \\\n # Fireworks AI\n FIREWORKSAI_API_KEY=\"\" FIREWORKSAI_MODEL_LIST=\"\" \\\n # Gitee AI\n GITEE_AI_API_KEY=\"\" GITEE_AI_MODEL_LIST=\"\" \\\n # GitHub\n GITHUB_TOKEN=\"\" GITHUB_MODEL_LIST=\"\" \\\n # Google\n GOOGLE_API_KEY=\"\" GOOGLE_MODEL_LIST=\"\" GOOGLE_PROXY_URL=\"\" \\\n # Groq\n GROQ_API_KEY=\"\" GROQ_MODEL_LIST=\"\" GROQ_PROXY_URL=\"\" \\\n # Higress\n HIGRESS_API_KEY=\"\" HIGRESS_MODEL_LIST=\"\" HIGRESS_PROXY_URL=\"\" \\\n # HuggingFace\n HUGGINGFACE_API_KEY=\"\" HUGGINGFACE_MODEL_LIST=\"\" HUGGINGFACE_PROXY_URL=\"\" \\\n # Hunyuan\n HUNYUAN_API_KEY=\"\" HUNYUAN_MODEL_LIST=\"\" \\\n # InternLM\n INTERNLM_API_KEY=\"\" INTERNLM_MODEL_LIST=\"\" \\\n # Jina\n JINA_API_KEY=\"\" JINA_MODEL_LIST=\"\" JINA_PROXY_URL=\"\" \\\n # Minimax\n MINIMAX_API_KEY=\"\" MINIMAX_MODEL_LIST=\"\" \\\n # Mistral\n MISTRAL_API_KEY=\"\" MISTRAL_MODEL_LIST=\"\" \\\n # Moonshot\n MOONSHOT_API_KEY=\"\" MOONSHOT_MODEL_LIST=\"\" MOONSHOT_PROXY_URL=\"\" \\\n # Novita\n NOVITA_API_KEY=\"\" NOVITA_MODEL_LIST=\"\" \\\n # Nvidia NIM\n NVIDIA_API_KEY=\"\" NVIDIA_MODEL_LIST=\"\" NVIDIA_PROXY_URL=\"\" \\\n # Ollama\n ENABLED_OLLAMA=\"\" OLLAMA_MODEL_LIST=\"\" OLLAMA_PROXY_URL=\"\" \\\n # OpenAI\n OPENAI_API_KEY=\"\" OPENAI_MODEL_LIST=\"\" OPENAI_PROXY_URL=\"\" \\\n # OpenRouter\n OPENROUTER_API_KEY=\"\" OPENROUTER_MODEL_LIST=\"\" \\\n # Perplexity\n PERPLEXITY_API_KEY=\"\" PERPLEXITY_MODEL_LIST=\"\" PERPLEXITY_PROXY_URL=\"\" \\\n # Qiniu\n QINIU_API_KEY=\"\" QINIU_MODEL_LIST=\"\" QINIU_PROXY_URL=\"\" \\\n # Qwen\n QWEN_API_KEY=\"\" QWEN_MODEL_LIST=\"\" QWEN_PROXY_URL=\"\" \\\n # SambaNova\n SAMBANOVA_API_KEY=\"\" SAMBANOVA_MODEL_LIST=\"\" \\\n # SenseNova\n SENSENOVA_API_KEY=\"\" SENSENOVA_MODEL_LIST=\"\" \\\n # SiliconCloud\n SILICONCLOUD_API_KEY=\"\" SILICONCLOUD_MODEL_LIST=\"\" SILICONCLOUD_PROXY_URL=\"\" \\\n # Spark\n SPARK_API_KEY=\"\" SPARK_MODEL_LIST=\"\" SPARK_PROXY_URL=\"\" SPARK_SEARCH_MODE=\"\" \\\n # Stepfun\n STEPFUN_API_KEY=\"\" STEPFUN_MODEL_LIST=\"\" \\\n # Taichu\n TAICHU_API_KEY=\"\" TAICHU_MODEL_LIST=\"\" \\\n # TogetherAI\n TOGETHERAI_API_KEY=\"\" TOGETHERAI_MODEL_LIST=\"\" \\\n # Upstage\n UPSTAGE_API_KEY=\"\" UPSTAGE_MODEL_LIST=\"\" \\\n # vLLM\n VLLM_API_KEY=\"\" VLLM_MODEL_LIST=\"\" VLLM_PROXY_URL=\"\" \\\n # Wenxin\n WENXIN_API_KEY=\"\" WENXIN_MODEL_LIST=\"\" \\\n # xAI\n XAI_API_KEY=\"\" XAI_MODEL_LIST=\"\" XAI_PROXY_URL=\"\" \\\n # Xinference\n XINFERENCE_API_KEY=\"\" XINFERENCE_MODEL_LIST=\"\" XINFERENCE_PROXY_URL=\"\" \\\n # 01.AI\n ZEROONE_API_KEY=\"\" ZEROONE_MODEL_LIST=\"\" \\\n # Zhipu\n ZHIPU_API_KEY=\"\" ZHIPU_MODEL_LIST=\"\" \\\n # Tencent Cloud\n TENCENT_CLOUD_API_KEY=\"\" TENCENT_CLOUD_MODEL_LIST=\"\" \\\n # Infini-AI\n INFINIAI_API_KEY=\"\" INFINIAI_MODEL_LIST=\"\"\n\nUSER nextjs\n\nEXPOSE 3210/tcp\n\nENTRYPOINT [\"/bin/node\"]\n\nCMD [\"/app/startServer.js\"]\n"}}, "Dockerfile.database": {"dd28a897c45e353c80b867121533705c619f09f9": {"t": 1785595554.518986, "n": 9850, "h": "df14ed9082bc1e07", "c": "## Set global build ENV\nARG NODEJS_VERSION=\"22\"\n\n## Base image for all building stages\nFROM node:${NODEJS_VERSION}-slim AS base\n\nARG USE_CN_MIRROR\n\nENV DEBIAN_FRONTEND=\"noninteractive\"\n\nRUN \\\n # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true\n if [ \"${USE_CN_MIRROR:-false}\" = \"true\" ]; then \\\n sed -i \"s/deb.debian.org/mirrors.ustc.edu.cn/g\" \"/etc/apt/sources.list.d/debian.sources\"; \\\n fi \\\n # Add required package\n && apt update \\\n && apt install ca-certificates proxychains-ng -qy \\\n # Prepare required package to distroless\n && mkdir -p /distroless/bin /distroless/etc /distroless/etc/ssl/certs /distroless/lib \\\n # Copy proxychains to distroless\n && cp /usr/lib/$(arch)-linux-gnu/libproxychains.so.4 /distroless/lib/libproxychains.so.4 \\\n && cp /usr/lib/$(arch)-linux-gnu/libdl.so.2 /distroless/lib/libdl.so.2 \\\n && cp /usr/bin/proxychains4 /distroless/bin/proxychains \\\n && cp /etc/proxychains4.conf /distroless/etc/proxychains4.conf \\\n # Copy node to distroless\n && cp /usr/lib/$(arch)-linux-gnu/libstdc++.so.6 /distroless/lib/libstdc++.so.6 \\\n && cp /usr/lib/$(arch)-linux-gnu/libgcc_s.so.1 /distroless/lib/libgcc_s.so.1 \\\n && cp /usr/local/bin/node /distroless/bin/node \\\n # Copy CA certificates to distroless\n && cp /etc/ssl/certs/ca-certificates.crt /distroless/etc/ssl/certs/ca-certificates.crt \\\n # Cleanup temp files\n && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*\n\n## Builder image, install all the dependencies and build the app\nFROM base AS builder\n\nARG USE_CN_MIRROR\nARG NEXT_PUBLIC_BASE_PATH\nARG NEXT_PUBLIC_SERVICE_MODE\nARG NEXT_PUBLIC_ENABLE_NEXT_AUTH\nARG NEXT_PUBLIC_SENTRY_DSN\nARG NEXT_PUBLIC_ANALYTICS_POSTHOG\nARG NEXT_PUBLIC_POSTHOG_HOST\nARG NEXT_PUBLIC_POSTHOG_KEY\nARG NEXT_PUBLIC_ANALYTICS_UMAMI\nARG NEXT_PUBLIC_UMAMI_SCRIPT_URL\nARG NEXT_PUBLIC_UMAMI_WEBSITE_ID\nARG FEATURE_FLAGS\n\nENV NEXT_PUBLIC_BASE_PATH=\"${NEXT_PUBLIC_BASE_PATH}\" \\\n FEATURE_FLAGS=\"${FEATURE_FLAGS}\"\n\nENV NEXT_PUBLIC_SERVICE_MODE=\"${NEXT_PUBLIC_SERVICE_MODE:-server}\" \\\n NEXT_PUBLIC_ENABLE_NEXT_AUTH=\"${NEXT_PUBLIC_ENABLE_NEXT_AUTH:-1}\" \\\n APP_URL=\"http://app.com\" \\\n DATABASE_DRIVER=\"node\" \\\n DATABASE_URL=\"postgres://postgres:password@localhost:5432/postgres\" \\\n KEY_VAULTS_SECRET=\"use-for-build\"\n\n# Sentry\nENV NEXT_PUBLIC_SENTRY_DSN=\"${NEXT_PUBLIC_SENTRY_DSN}\" \\\n SENTRY_ORG=\"\" \\\n SENTRY_PROJECT=\"\"\n\n# Posthog\nENV NEXT_PUBLIC_ANALYTICS_POSTHOG=\"${NEXT_PUBLIC_ANALYTICS_POSTHOG}\" \\\n NEXT_PUBLIC_POSTHOG_HOST=\"${NEXT_PUBLIC_POSTHOG_HOST}\" \\\n NEXT_PUBLIC_POSTHOG_KEY=\"${NEXT_PUBLIC_POSTHOG_KEY}\"\n\n# Umami\nENV NEXT_PUBLIC_ANALYTICS_UMAMI=\"${NEXT_PUBLIC_ANALYTICS_UMAMI}\" \\\n NEXT_PUBLIC_UMAMI_SCRIPT_URL=\"${NEXT_PUBLIC_UMAMI_SCRIPT_URL}\" \\\n NEXT_PUBLIC_UMAMI_WEBSITE_ID=\"${NEXT_PUBLIC_UMAMI_WEBSITE_ID}\"\n\n# Node\nENV NODE_OPTIONS=\"--max-old-space-size=8192\"\n\nWORKDIR /app\n\nCOPY package.json pnpm-workspace.yaml ./\nCOPY .npmrc ./\nCOPY packages ./packages\n\nRUN \\\n # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true\n if [ \"${USE_CN_MIRROR:-false}\" = \"true\" ]; then \\\n export SENTRYCLI_CDNURL=\"https://npmmirror.com/mirrors/sentry-cli\"; \\\n npm config set registry \"https://registry.npmmirror.com/\"; \\\n echo 'canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas' >> .npmrc; \\\n fi \\\n # Set the registry for corepack\n && export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\\/$//') \\\n # Update corepack to latest (nodejs/corepack#612)\n && npm i -g corepack@latest \\\n # Enable corepack\n && corepack enable \\\n # Use pnpm for corepack\n && corepack use $(sed -n 's/.*\"packageManager\": \"\\(.*\\)\".*/\\1/p' package.json) \\\n # Install the dependencies\n && pnpm i \\\n # Add db migration dependencies\n && mkdir -p /deps \\\n && cd /deps \\\n && pnpm init \\\n && pnpm add pg drizzle-orm\n\nCOPY . .\n\n# run build standalone for docker version\nRUN npm run build:docker\n\n## Application image, copy all the files for production\nFROM busybox:latest AS app\n\nCOPY --from=base /distroless/ /\n\n# Automatically leverage output traces to reduce image size\n# https://nextjs.org/docs/advanced-features/output-file-tracing\nCOPY --from=builder /app/.next/standalone /app/\n\n# Copy database migrations\nCOPY --from=builder /app/src/database/migrations /app/migrations\nCOPY --from=builder /app/scripts/migrateServerDB/docker.cjs /app/docker.cjs\nCOPY --from=builder /app/scripts/migrateServerDB/errorHint.js /app/errorHint.js\n\n# copy dependencies\nCOPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm\nCOPY --from=builder /deps/node_modules/pg /app/node_modules/pg\nCOPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm\n\n# Copy server launcher\nCOPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js\n\nRUN \\\n # Add nextjs:nodejs to run the app\n addgroup -S -g 1001 nodejs \\\n && adduser -D -G nodejs -H -S -h /app -u 1001 nextjs \\\n # Set permission for nextjs:nodejs\n && chown -R nextjs:nodejs /app /etc/proxychains4.conf\n\n## Production image, copy all the files and run next\nFROM scratch\n\n# Copy all the files from app, set the correct permission for prerender cache\nCOPY --from=app / /\n\nENV NODE_ENV=\"production\" \\\n NODE_OPTIONS=\"--dns-result-order=ipv4first --use-openssl-ca\" \\\n NODE_EXTRA_CA_CERTS=\"\" \\\n NODE_TLS_REJECT_UNAUTHORIZED=\"\" \\\n SSL_CERT_DIR=\"/etc/ssl/certs/ca-certificates.crt\"\n\n# Make the middleware rewrite through local as default\n# refs: https://github.com/lobehub/lobe-chat/issues/5876\nENV MIDDLEWARE_REWRITE_THROUGH_LOCAL=\"1\"\n\n# set hostname to localhost\nENV HOSTNAME=\"0.0.0.0\" \\\n PORT=\"3210\"\n\n# General Variables\nENV ACCESS_CODE=\"\" \\\n APP_URL=\"\" \\\n API_KEY_SELECT_MODE=\"\" \\\n DEFAULT_AGENT_CONFIG=\"\" \\\n SYSTEM_AGENT=\"\" \\\n FEATURE_FLAGS=\"\" \\\n PROXY_URL=\"\"\n\n# Database\nENV KEY_VAULTS_SECRET=\"\" \\\n DATABASE_DRIVER=\"node\" \\\n DATABASE_URL=\"\"\n\n# Next Auth\nENV NEXT_AUTH_SECRET=\"\" \\\n NEXT_AUTH_SSO_PROVIDERS=\"\" \\\n NEXTAUTH_URL=\"\"\n\n# S3\nENV NEXT_PUBLIC_S3_DOMAIN=\"\" \\\n S3_PUBLIC_DOMAIN=\"\" \\\n S3_ACCESS_KEY_ID=\"\" \\\n S3_BUCKET=\"\" \\\n S3_ENDPOINT=\"\" \\\n S3_SECRET_ACCESS_KEY=\"\"\n\n# Model Variables\nENV \\\n # AI21\n AI21_API_KEY=\"\" AI21_MODEL_LIST=\"\" \\\n # Ai360\n AI360_API_KEY=\"\" AI360_MODEL_LIST=\"\" \\\n # Anthropic\n ANTHROPIC_API_KEY=\"\" ANTHROPIC_MODEL_LIST=\"\" ANTHROPIC_PROXY_URL=\"\" \\\n # Amazon Bedrock\n AWS_ACCESS_KEY_ID=\"\" AWS_SECRET_ACCESS_KEY=\"\" AWS_REGION=\"\" AWS_BEDROCK_MODEL_LIST=\"\" \\\n # Azure OpenAI\n AZURE_API_KEY=\"\" AZURE_API_VERSION=\"\" AZURE_ENDPOINT=\"\" AZURE_MODEL_LIST=\"\" \\\n # Baichuan\n BAICHUAN_API_KEY=\"\" BAICHUAN_MODEL_LIST=\"\" \\\n # Cloudflare\n CLOUDFLARE_API_KEY=\"\" CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID=\"\" CLOUDFLARE_MODEL_LIST=\"\" \\\n # Cohere\n COHERE_API_KEY=\"\" COHERE_MODEL_LIST=\"\" COHERE_PROXY_URL=\"\" \\\n # DeepSeek\n DEEPSEEK_API_KEY=\"\" DEEPSEEK_MODEL_LIST=\"\" \\\n # Fireworks AI\n FIREWORKSAI_API_KEY=\"\" FIREWORKSAI_MODEL_LIST=\"\" \\\n # Gitee AI\n GITEE_AI_API_KEY=\"\" GITEE_AI_MODEL_LIST=\"\" \\\n # GitHub\n GITHUB_TOKEN=\"\" GITHUB_MODEL_LIST=\"\" \\\n # Google\n GOOGLE_API_KEY=\"\" GOOGLE_MODEL_LIST=\"\" GOOGLE_PROXY_URL=\"\" \\\n # Groq\n GROQ_API_KEY=\"\" GROQ_MODEL_LIST=\"\" GROQ_PROXY_URL=\"\" \\\n # Higress\n HIGRESS_API_KEY=\"\" HIGRESS_MODEL_LIST=\"\" HIGRESS_PROXY_URL=\"\" \\\n # HuggingFace\n HUGGINGFACE_API_KEY=\"\" HUGGINGFACE_MODEL_LIST=\"\" HUGGINGFACE_PROXY_URL=\"\" \\\n # Hunyuan\n HUNYUAN_API_KEY=\"\" HUNYUAN_MODEL_LIST=\"\" \\\n # InternLM\n INTERNLM_API_KEY=\"\" INTERNLM_MODEL_LIST=\"\" \\\n # Jina\n JINA_API_KEY=\"\" JINA_MODEL_LIST=\"\" JINA_PROXY_URL=\"\" \\\n # Minimax\n MINIMAX_API_KEY=\"\" MINIMAX_MODEL_LIST=\"\" \\\n # Mistral\n MISTRAL_API_KEY=\"\" MISTRAL_MODEL_LIST=\"\" \\\n # Moonshot\n MOONSHOT_API_KEY=\"\" MOONSHOT_MODEL_LIST=\"\" MOONSHOT_PROXY_URL=\"\" \\\n # Novita\n NOVITA_API_KEY=\"\" NOVITA_MODEL_LIST=\"\" \\\n # Nvidia NIM\n NVIDIA_API_KEY=\"\" NVIDIA_MODEL_LIST=\"\" NVIDIA_PROXY_URL=\"\" \\\n # Ollama\n ENABLED_OLLAMA=\"\" OLLAMA_MODEL_LIST=\"\" OLLAMA_PROXY_URL=\"\" \\\n # OpenAI\n OPENAI_API_KEY=\"\" OPENAI_MODEL_LIST=\"\" OPENAI_PROXY_URL=\"\" \\\n # OpenRouter\n OPENROUTER_API_KEY=\"\" OPENROUTER_MODEL_LIST=\"\" \\\n # Perplexity\n PERPLEXITY_API_KEY=\"\" PERPLEXITY_MODEL_LIST=\"\" PERPLEXITY_PROXY_URL=\"\" \\\n # PPIO\n PPIO_API_KEY=\"\" PPIO_MODEL_LIST=\"\" \\\n # Qiniu\n QINIU_API_KEY=\"\" QINIU_MODEL_LIST=\"\" QINIU_PROXY_URL=\"\" \\\n # Qwen\n QWEN_API_KEY=\"\" QWEN_MODEL_LIST=\"\" QWEN_PROXY_URL=\"\" \\\n # SambaNova\n SAMBANOVA_API_KEY=\"\" SAMBANOVA_MODEL_LIST=\"\" \\\n # Search1API\n SEARCH1API_API_KEY=\"\" SEARCH1API_MODEL_LIST=\"\" \\\n # SenseNova\n SENSENOVA_API_KEY=\"\" SENSENOVA_MODEL_LIST=\"\" \\\n # SiliconCloud\n SILICONCLOUD_API_KEY=\"\" SILICONCLOUD_MODEL_LIST=\"\" SILICONCLOUD_PROXY_URL=\"\" \\\n # Spark\n SPARK_API_KEY=\"\" SPARK_MODEL_LIST=\"\" SPARK_PROXY_URL=\"\" SPARK_SEARCH_MODE=\"\" \\\n # Stepfun\n STEPFUN_API_KEY=\"\" STEPFUN_MODEL_LIST=\"\" \\\n # Taichu\n TAICHU_API_KEY=\"\" TAICHU_MODEL_LIST=\"\" \\\n # TogetherAI\n TOGETHERAI_API_KEY=\"\" TOGETHERAI_MODEL_LIST=\"\" \\\n # Upstage\n UPSTAGE_API_KEY=\"\" UPSTAGE_MODEL_LIST=\"\" \\\n # vLLM\n VLLM_API_KEY=\"\" VLLM_MODEL_LIST=\"\" VLLM_PROXY_URL=\"\" \\\n # Wenxin\n WENXIN_API_KEY=\"\" WENXIN_MODEL_LIST=\"\" \\\n # xAI\n XAI_API_KEY=\"\" XAI_MODEL_LIST=\"\" XAI_PROXY_URL=\"\" \\\n # Xinference\n XINFERENCE_API_KEY=\"\" XINFERENCE_MODEL_LIST=\"\" XINFERENCE_PROXY_URL=\"\" \\\n # 01.AI\n ZEROONE_API_KEY=\"\" ZEROONE_MODEL_LIST=\"\" \\\n # Zhipu\n ZHIPU_API_KEY=\"\" ZHIPU_MODEL_LIST=\"\" \\\n # Tencent Cloud\n TENCENT_CLOUD_API_KEY=\"\" TENCENT_CLOUD_MODEL_LIST=\"\" \\\n # Infini-AI\n INFINIAI_API_KEY=\"\" INFINIAI_MODEL_LIST=\"\"\n\nUSER nextjs\n\nEXPOSE 3210/tcp\n\nENTRYPOINT [\"/bin/node\"]\n\nCMD [\"/app/startServer.js\"]\n"}}, ".env.example": {"dd28a897c45e353c80b867121533705c619f09f9": {"t": 1785595569.3411052, "n": 6517, "h": "b358d4981ab0ec0f", "c": "# add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.\n# ACCESS_CODE=lobe66\n\n# Specify your API Key selection method, currently supporting `random` and `turn`.\n# API_KEY_SELECT_MODE=random\n\n\n########################################\n########## AI Provider Service #########\n########################################\n\n### OpenAI ###\n\n# you openai api key\nOPENAI_API_KEY=sk-xxxxxxxxx\n\n# use a proxy to connect to the OpenAI API\n# OPENAI_PROXY_URL=https://api.openai.com/v1\n\n# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106\n# OPENAI_MODEL_LIST=gpt-3.5-turbo\n\n\n### Azure OpenAI ###\n\n# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview\n# use Azure OpenAI Service by uncomment the following line\n\n# The API key you applied for on the Azure OpenAI account page, which can be found in the \"Keys and Endpoints\" section.\n# AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n# The endpoint you applied for on the Azure OpenAI account page, which can be found in the \"Keys and Endpoints\" section.\n# AZURE_ENDPOINT=https://docs-test-001.openai.azure.com\n\n# Azure's API version, follows the YYYY-MM-DD format\n# AZURE_API_VERSION=2024-10-21\n\n\n### Anthropic Service ####\n\n# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n# use a proxy to connect to the Anthropic API\n# ANTHROPIC_PROXY_URL=https://api.anthropic.com\n\n\n### Google AI ####\n\n# GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n\n### AWS Bedrock ###\n\n# AWS_REGION=us-east-1\n# AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx\n# AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n\n### Ollama AI ####\n\n# You can use ollama to get and run LLM locally, learn more about it via https://github.com/ollama/ollama\n\n# The local/remote ollama service url\n# OLLAMA_PROXY_URL=http://127.0.0.1:11434\n\n# OLLAMA_MODEL_LIST=your_ollama_model_names\n\n\n### OpenRouter Service ###\n\n# OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# OPENROUTER_MODEL_LIST=model1,model2,model3\n\n\n### Mistral AI ###\n\n# MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### Perplexity Service ###\n\n# PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### Groq Service ####\n\n# GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n#### 01.AI Service ####\n\n# ZEROONE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### TogetherAI Service ###\n\n# TOGETHERAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### ZhiPu AI ###\n\n# ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx\n\n### Moonshot AI ####\n\n# MOONSHOT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### Minimax AI ####\n\n# MINIMAX_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### DeepSeek AI ####\n\n# DEEPSEEK_PROXY_URL=https://api.deepseek.com/v1\n# DEEPSEEK_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### Qiniu AI ####\n\n# QINIU_PROXY_URL=https://api.qnaigc.com/v1\n# QINIU_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### Qwen AI ####\n\n# QWEN_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### Cloudflare Workers AI ####\n\n# CLOUDFLARE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### SiliconCloud AI ####\n\n# SILICONCLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n\n### TencentCloud AI ####\n\n# TENCENT_CLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### PPIO ####\n\n# PPIO_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n### INFINI-AI ###\n\n# INFINIAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n########################################\n############ Market Service ############\n########################################\n\n# The LobeChat agents market index url\n# AGENTS_INDEX_URL=https://chat-agents.lobehub.com\n\n########################################\n############ Plugin Service ############\n########################################\n\n# The LobeChat plugins store index url\n# PLUGINS_INDEX_URL=https://chat-plugins.lobehub.com\n\n# set the plugin settings\n# the format is `plugin-identifier:key1=value1;key2=value2`, multiple settings fields are separated by semicolons `;`, multiple plugin settings are separated by commas `,`.\n# PLUGIN_SETTINGS=search-engine:SERPAPI_API_KEY=xxxxx\n\n########################################\n####### Doc / Changelog Service ########\n########################################\n\n# Use in Changelog / Document service cdn url prefix\n# DOC_S3_PUBLIC_DOMAIN=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n# Use in dev cdn workflow\n# DOC_S3_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# DOC_S3_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n\n########################################\n##### S3 Object Storage Service ########\n########################################\n\n# S3 keys\n# S3_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# S3_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n# Bucket name\n# S3_BUCKET=lobechat\n\n# Bucket request endpoint\n# S3_ENDPOINT=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.r2.cloudflarestorage.com\n\n# Public access domain for the bucket\n# S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com\n\n# Bucket region, such as us-west-1, generally not needed to add\n# but some service providers may require configuration\n# S3_REGION=us-west-1\n\n\n########################################\n############ Auth Service ##############\n########################################\n\n\n# Clerk related configurations\n\n# Clerk public key and secret key\n#NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx\n#CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx\n\n# you need to config the clerk webhook secret key if you want to use the clerk with database\n#CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx\n\n\n# NextAuth related configurations\n# NEXT_PUBLIC_ENABLE_NEXT_AUTH=1\n# NEXT_AUTH_SECRET=\n\n# Auth0 configurations\n# AUTH_AUTH0_ID=\n# AUTH_AUTH0_SECRET=\n# AUTH_AUTH0_ISSUER=https://your-domain.auth0.com\n\n########################################\n########## Server Database #############\n########################################\n\n# Specify the service mode as server if you want to use the server database\n# NEXT_PUBLIC_SERVICE_MODE=server\n\n# Postgres database URL\n# DATABASE_URL=postgres://username:password@host:port/database\n\n# use `openssl rand -base64 32` to generate a key for the encryption of the database\n# we use this key to encrypt the user api key and proxy url\n#KEY_VAULTS_SECRET=xxxxx/xxxxxxxxxxxxxx=\n\n# Specify the Embedding model and Reranker model(unImplemented)\n# DEFAULT_FILES_CONFIG=\"embedding_model=openai/embedding-text-3-small,reranker_model=cohere/rerank-english-v3.0,query_mode=full_text\"\n"}}, "docs/self-hosting/environment-variables/model-provider.mdx": {"dd28a897c45e353c80b867121533705c619f09f9": {"t": 1785595574.138118, "n": 21107, "h": "d63a05dfc1a46d58", "c": "---\ntitle: LobeChat Model Service Providers - Environment Variables and Configuration\ndescription: >-\n Learn about the environment variables and configuration settings for various\n model service providers like OpenAI, Google AI, AWS Bedrock, Ollama,\n Perplexity AI, Anthropic AI, Mistral AI, Groq AI, OpenRouter AI, and 01.AI.\ntags:\n - Model Service Providers\n - Environment Variables\n---\n\n# Model Providers\n\nWhen deploying LobeChat, a rich set of environment variables related to model service providers is provided, allowing you to easily define the model service providers to be enabled in LobeChat.\n\n## OpenAI\n\n### `ENABLED_OPENAI`\n\n- Type:Optional\n- Description:Enables OpenAI as a model provider by default, turns off the OpenAI service when set to `0`\n- Default:`1`\n- Example:`0`\n\n### `OPENAI_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for on the OpenAI account page, you can check it out [here](https://platform.openai.com/api-keys)\n- Default: -\n- Example: `sk-xxxxxx...xxxxxx`\n\n### `OPENAI_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL\n- Default: `https://api.openai.com/v1`\n- Example: `https://api.chatanywhere.cn` or `https://aihubmix.com/v1`\n\n<Callout type={'warning'}>\n Please check the request suffix of your proxy service provider. Some proxy service providers may\n add `/v1` to the request suffix, while others may not. If you find that the AI returns an empty\n message during testing, try adding the `/v1` suffix and retry.\n</Callout>\n\n<Callout type={'info'}>\n Whether to fill in `/v1` is closely related to the model service provider. For example, the\n default address of openai is `api.openai.com/v1`. If your proxy forwards the `/v1` interface, you\n can simply fill in `proxy.com`. However, if the model service provider directly forwards the\n `api.openai.com` domain, then you need to add `/v1` to the URL yourself.\n</Callout>\n\nRelated discussions:\n\n- [Why is the return value blank after installing Docker, configuring environment variables?](https://github.com/lobehub/lobe-chat/discussions/623)\n- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobe-chat/discussions/734)\n- [No response in chat after filling in the proxy server address](https://github.com/lobehub/lobe-chat/discussions/1065)\n\n### `OPENAI_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`\n\nThe above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled.\n\nYou can find all current model names in [modelProviders](https://github.com/lobehub/lobe-chat/tree/main/src/config/modelProviders).\n\n## Azure OpenAI\n\nIf you need to use Azure OpenAI to provide model services, you can refer to the [Deploying with Azure OpenAI](/docs/self-hosting/examples/azure-openai) section for detailed steps. Here, we will list the environment variables related to Azure OpenAI.\n\n### `AZURE_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for on the Azure OpenAI account page\n- Default: -\n- Example: `c55168be3874490ef0565d9779ecd5a6`\n\n### `AZURE_ENDPOINT`\n\n- Type: Required\n- Description: The endpoint of Azure OpenAI, you can find it in the Azure OpenAI account page\n- Default: `-`\n- Example: `https://docs-test-001.openai.azure.com`\n\n### `AZURE_API_VERSION`\n\n- Type: Required\n- Description: The API version of Azure, following the format YYYY-MM-DD\n- Default: `-`\n- Example: `2023-02-01`, refer to [latest version](https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version)\n\n### `AZURE_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deploymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>`\n\n## Google AI\n\n### `GOOGLE_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Google AI Platform to access Google AI services\n- Default: -\n- Example: `AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE`\n\n### `GOOGLE_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Google API proxy, you can use this configuration item to override the default Google API request base URL\n- Default: `https://generativelanguage.googleapis.com`\n- Example: `https://api.genai.gd.edu.kg/google`\n\n### `GOOGLE_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest`\n\n## Anthropic AI\n\n### `ANTHROPIC_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Anthropic AI\n- Default: -\n- Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx`\n\n### `ANTHROPIC_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Anthropic API proxy, you can use this configuration item to override the default Anthropic API request base URL\n- Default: `https://api.anthropic.com`\n- Example: `https://my-anthropic-proxy.com`\n\n## AWS Bedrock\n\n### `ENABLED_AWS_BEDROCK`\n\n- Type:Optional\n- Description:Enables AWS Bedrock as a model provider by default, turns on the AWS Bedrock service when set to `1`\n- Default:`0`\n- Example:`1`\n\n### `AWS_ACCESS_KEY_ID`\n\n- Type: Required\n- Description: Access key ID for AWS service authentication\n- Default: -\n- Example: `AKIA5STVRLFSB4S9HWBR`\n\n### `AWS_SECRET_ACCESS_KEY`\n\n- Type: Required\n- Description: Key for AWS service authentication\n- Default: -\n- Example: `Th3vXxLYpuKcv2BARktPSTPxx+jbSiFT6/0w7oEC`\n\n### `AWS_REGION`\n\n- Type: Optional\n- Description: Region setting for AWS services\n- Default: `us-east-1`\n- Example: `us-east-1`\n\n## DeepSeek AI\n\n### `DEEPSEEK_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the DeepSeek API proxy, you can use this configuration item to override the default DeepSeek API request base URL\n- Default: `https://api.deepseek.com`\n- Example: `https://my-deepseek-proxy.com`\n\n### `DEEPSEEK_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the DeepSeek AI service\n- Default: -\n- Example: `sk-xxxxxx...xxxxxx`\n\n### `DEEPSEEK_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+deepseek-reasoner`\n\n## XAI\n\n### `XAI_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the XAI service\n- Default: -\n- Example: `xai-xxxxxx...xxxxxx`\n\n## Wenxin\n\n### `WENXIN_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Baidu Wenxin service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n## OpenRouter AI\n\n### `OPENROUTER_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the OpenRouter AI service\n- Default: -\n- Example: `sk-or-v1-xxxxxx...xxxxxx=`\n\n### `OPENROUTER_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to specify a custom OpenRouter model list. Model definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta`\n\n## PPIO\n\n### `PPIO_API_KEY`\n\n- Type: Required\n- Description: This your PPIO API Key.\n- Default: -\n- Example: `sk_xxxxxxxxxx`\n\n### `PPIO_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+deepseek/deepseek-v3/community,+deepseek/deepseek-r1-distill-llama-70b`\n\n## Github\n\n### `GITHUB_TOKEN`\n\n- Type: Required\n- Description: This is your Personal access tokens you got for in the Github\n- Default: `-`\n- Example:`ghp_xxxxxx...xxxxxx=`\n\n### `GITHUB_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+gpt-4o,+gpt-4o-mini`\n\n## TogetherAI\n\n### `TOGETHERAI_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the TogetherAI service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n### `TOGETHERAI_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to specify a custom TogetherAI model list. Model definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo,+meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`\n\n## Fireworks AI\n\n### `FIREWORKSAI_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Fireworks AI service\n- Default: `-`\n- Example:`xxxxxx...xxxxxx`\n\n### `FIREWORKSAI_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1`\n\n## Ollama\n\n### `ENABLED_OLLAMA`\n\n- Type:Optional\n- Description:Enables Ollama as a model provider by default, turns off the Ollama service when set to `0`\n- Default:`1`\n- Example:`0`\n\n### `OLLAMA_PROXY_URL`\n\n- Type: Required\n- Description: Used to enable the Ollama service, setting this will display optional open-source language models in the language model list and can also specify custom language models\n- Default: -\n- Example: `http://127.0.0.1:11434`\n\n### `OLLAMA_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to specify a custom Ollama language model. Model definition syntax rules see [model-list][model-list]\n- Default: -\n- Example: `llama2:7B`\n\n## Moonshot AI\n\n### `MOONSHOT_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Moonshot AI service\n- Default: -\n- Example: `Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=`\n\n### `MOONSHOT_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Moonshot API proxy, you can use this configuration item to override the default Moonshot API request base URL\n- Default: `https://api.moonshot.cn/v1`\n- Example: `https://my-moonshot-proxy.com/v1`\n\n## Perplexity AI\n\n### `PERPLEXITY_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Perplexity AI\n- Default: -\n- Example: `pplx-xxxxxx...xxxxxx`\n\n### `PERPLEXITY_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Perplexity API proxy, you can use this configuration item to override the default Perplexity API request base URL\n- Default: `https://api.Perplexity.ai`\n- Example: `https://my-Perplexity-proxy.com`\n\n### `PERPLEXITY_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see\n- Default: `-`\n- Example: `-all,+llama-3.1-sonar-small-128k-online,+llama-3.1-sonar-small-128k-chat`\n\n## Minimax AI\n\n### `MINIMAX_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Minimax AI service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n## Mistral AI\n\n### `MISTRAL_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Mistral AI service\n- Default: -\n- Example: `xxxxxx...xxxxxx=`\n\n## Groq AI\n\n### `GROQ_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Groq AI\n- Default: -\n- Example: `gsk_xxxxxx...xxxxxx`\n\n### `GROQ_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Groq API proxy, you can use this configuration item to override the default Groq API request base URL\n- Default: `https://api.groq.com/openai/v1`\n- Example: `https://my-groq-proxy.com/v1`\n\n### `GROQ_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+gemma2-9b-it,+llama-3.1-8b-instant`\n\n## ZHIPU AI\n\n### `ZHIPU_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the ZHIPU AI service\n- Default: -\n- Example: `4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT`\n\n### `ZHIPU_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+glm-4-alltools,+glm-4-plus`\n\n## 01.AI\n\n### `ZEROONE_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the 01.AI service\n- Default: -\n- Example:`xxxxxx...xxxxxx`\n\n### `ZEROONE_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+yi-large,+yi-large-rag`\n\n## Qiniu\n\n### `QINIU_API_KEY`\n\n- Type: Required\n- Description: This is the API key you can obtain from Qiniu AI service\n- Default: -\n- Example:`sk-xxxxx...xxxxx`\n\n### `QINIU_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+deepseek-r1,+deepseek-v3`\n\n### `QINIU_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Qiniu API proxy, you can use this configuration item to override the default Qiniu API request base URL\n- Default: `https://api.qnaigc.com/v1`\n- Example: `https://my-qnaigc.com/v1`\n\n## Qwen\n\n### `QWEN_API_KEY`\n\n- Type: Required\n- Description: This is the DashScope API key you can obtain from Alibaba Cloud\n- Default: -\n- Example:`sk-xxxxx...xxxxx`\n\n### `QWEN_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+qwen-turbo-latest,+qwen-plus-latest`\n\n### `QWEN_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Qwen API proxy, you can use this configuration item to override the default Qwen API request base URL\n- Default: `https://dashscope.aliyuncs.com/compatible-mode/v1`\n- Example: `https://my-qwen-proxy.com/v1`\n\n## Stepfun AI\n\n### `STEPFUN_API_KEY`\n\n- Type: Required\n- Description: This is the DashScope API key you can obtain from Stepfun AI service\n- Default: -\n- Example:`sk-xxxxx...xxxxx`\n\n## Novita AI\n\n### `NOVITA_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the Novita AI service\n- Default: -\n- Example:`xxxxxx...xxxxxx`\n\n### `NOVITA_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instruct`\n\n## BAICHUAN\n\n### `BAICHUAN_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the BAICHUAN service\n- Default: -\n- Example:`xxxxxx...xxxxxx`\n\n## TAICHU\n\n### `TAICHU_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the TAICHU service\n- Default: -\n- Example:`xxxxxx...xxxxxx`\n\n## 360 AI\n\n### `AI360_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied for in the 360 AI service\n- Default: -\n- Example:`xxxxxx...xxxxxx`\n\n## Siliconflow\n\n### `SILICONCLOUD_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Siliconflow service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n### `SILICONCLOUD_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Siliconflow API proxy, you can use this configuration item to override the default Siliconflow API request base URL\n- Default: `https://api.siliconflow.cn/v1`\n- Example: `https://my-siliconflow-proxy.com/v1`\n\n### `SILICONCLOUD_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+deepseek-ai/DeepSeek-V2.5,+Qwen/Qwen2.5-7B-Instruct`\n\n## Upstage AI\n\n### `UPSTAGE_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Upstage AI service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n## Spark AI\n\n### `SPARK_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Spark AI service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n## A21 AI\n\n### `AI21_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from `AI21_API_KEY` service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n## HUNYUAN\n\n### `HUNYUAN_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from HUNYUAN service\n- Default: -\n- Example: `xxxxxx...xxxxxx`\n\n### `HUNYUAN_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+hunyuan-lite,+hunyuan-standard`\n\n## Volcengine\n\n### `VOLCENGINE_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Volcengine service, you can check it out [here](https://console.volcengine.com/ark/region:ark+cn-beijing/endpoint)\n- Default: -\n- Example: `ad925b3d-aaaa-bbbb-cccc-51fde2f50547`\n\n### `VOLCENGINE_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name->deploymentName=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+deepseek-r1->deepseek-r1-250120,+deepseek-v3->deepseek-v3-250324,+doubao-1.5-pro-256k->doubao-1-5-pro-256k-250115,+doubao-1.5-pro-32k->doubao-1-5-pro-32k-250115,+doubao-1.5-lite-32k->doubao-1-5-lite-32k-250115`\n\n### `VOLCENGINE_PROXY_URL`\n\n- Type: Optional\n- Description: If you manually configure the Volcengine API proxy, you can use this configuration item to override the default Volcengine API request base URL\n- Default: `https://ark.cn-beijing.volces.com/api/v3`\n- Example: `https://my-volcengine-proxy.com/v1`\n\n## InfiniAI\n\n### `INFINIAI_API_KEY`\n\n- Type: Required\n- Description: This is the API key you applied from Infini-AI, you can check it out [here](https://cloud.infini-ai.com)\n- Default: -\n- Example: `sk-xxxxxx...xxxxxx`\n\n### `INFINIAI_MODEL_LIST`\n\n- Type: Optional\n- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name->deploymentName=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]\n- Default: `-`\n- Example: `-all,+qwq-32b,+deepseek-r1`\n\n[model-list]: /docs/self-hosting/advanced/model-list\n"}}, "docs/self-hosting/environment-variables/model-provider.zh-CN.mdx": {"dd28a897c45e353c80b867121533705c619f09f9": {"t": 1785595581.5360372, "n": 12993, "h": "54d55a9714dcd4e8", "c": "---\ntitle: LobeChat 模型服务商相关环境变量配置指南\ndescription: 了解如何配置各个模型服务商的环境变量以在 LobeChat 中使用不同的AI模型服务。\ntags:\n - LobeChat\n - 模型服务商\n - 环境变量\n - AI模型\n - 配置指南\n---\n\n# 模型服务商\n\nLobeChat 在部署时提供了丰富的模型服务商相关的环境变量,你可以使用这些环境变量轻松定义需要在 LobeChat 中开启的模型服务商。\n\n## OpenAI\n\n### `ENABLED_OPENAI`\n\n- 类型:可选\n- 描述:默认启用 OpenAI 作为模型供应商,当设为 0 时关闭 OpenAI 服务\n- 默认值:`1`\n- 示例:`0`\n\n### `OPENAI_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 OpenAI 账户页面申请的 API 密钥,可以前往 [这里](https://platform.openai.com/api-keys) 查看\n- 默认值:-\n- 示例:`sk-xxxxxx...xxxxxx`\n\n### `OPENAI_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL\n- 默认值:`https://api.openai.com/v1`\n- 示例:`https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`\n\n<Callout type={'warning'}>\n 请检查你的代理服务商的请求后缀,有的代理服务商会在请求后缀添加\n `/v1`,有的则不会。如果你在测试时发现 AI 返回的消息为空,请尝试添加 `/v1` 后缀后重试。\n</Callout>\n\n<Callout type={'info'}>\n 是否填写 `/v1` 跟模型服务商有很大关系,比如 openai 的默认地址是 `api.openai.com/v1`\n 。如果你的代理商转发了 `/v1` 这个接口,那么直接填 `proxy.com` 即可。 但如果模型服务商是直接转发了\n `api.openai.com` 域名,那么你就要自己加上 `/v1` 这个 url。\n</Callout>\n\n相关讨论:\n\n- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/lobe-chat/discussions/623)\n- [使用第三方接口报错的原因](https://github.com/lobehub/lobe-chat/discussions/734)\n- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobe-chat/discussions/1065)\n\n### `OPENAI_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`\n\n上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。\n\n你可以在 [modelProviders](https://github.com/lobehub/lobe-chat/tree/main/src/config/modelProviders) 查找到当前的所有模型名。\n\n## Azure OpenAI\n\n如果你需要使用 Azure OpenAI 来提供模型服务,可以查阅 [使用 Azure OpenAI 部署](/zh/docs/self-hosting/examples/azure-openai) 章节查看详细步骤,这里将列举和 Azure OpenAI 相关的环境变量。\n\n### `AZURE_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Azure OpenAI 账户页面申请的 API 密钥\n- 默认值:-\n- 示例:`c55168be3874490ef0565d9779ecd5a6`\n\n### `AZURE_ENDPOINT`\n\n- 类型:必选\n- 描述:Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值\n- 默认值:`-`\n- 示例:`https://docs-test-001.openai.azure.com`\n\n### `AZURE_API_VERSION`\n\n- 类型:必选\n- 描述:Azure 的 API 版本,遵循 YYYY-MM-DD 格式\n- 默认值:`-`\n- 示例:`2024-02-01`,查阅 [最新版本](https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version)\n\n### `AZURE_MODEL_LIST`\n\n- 类型:必选\n- 描述:用来控制模型列表,使用 `模型名->部署名=展示名` 来自定义模型的展示名,用英文逗号隔开。支持扩展能力,其余语法规则详见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>`\n\n## Google AI\n\n### `GOOGLE_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Google AI Platform 申请的 API 密钥,用于访问 Google AI 服务\n- 默认值:-\n- 示例:`AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE`\n\n### `GOOGLE_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Google 接口代理,可以使用此配置项来覆盖默认的 Google API 请求基础 URL\n- 默认值:`https://generativelanguage.googleapis.com`\n- 示例:`https://api.genai.gd.edu.kg/google`\n\n### `GOOGLE_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest`\n\n## Anthropic AI\n\n### `ANTHROPIC_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Anthropic AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx`\n\n### `ANTHROPIC_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Anthropic 接口代理,可以使用此配置项来覆盖默认的 Anthropic API 请求基础 URL\n- 默认值:`https://api.anthropic.com`\n- 示例:`https://my-anthropic-proxy.com`\n\n## AWS Bedrock\n\n### `ENABLED_AWS_BEDROCK`\n\n- 类型:可选\n- 描述:当设为 1 时启用 AWS Bedrock 服务\n- 默认值:`0`\n- 示例:`1`\n\n### `AWS_ACCESS_KEY_ID`\n\n- 类型:必选\n- 描述:用于 AWS 服务认证的访问键 ID\n- 默认值:-\n- 示例:`AKIA5STVRLFSB4S9HWBR`\n\n### `AWS_SECRET_ACCESS_KEY`\n\n- 类型:必选\n- 描述:用于 AWS 服务认证的密钥\n- 默认值:-\n- 示例:`Th3vXxLYpuKcv2BARktPSTPxx+jbSiFT6/0w7oEC`\n\n### `AWS_REGION`\n\n- 类型:可选\n- 描述:AWS 服务的区域设置\n- 默认值:`us-east-1`\n- 示例:`us-east-1`\n\n## DeepSeek AI\n\n### `DEEPSEEK_PROXY_URL`\n\n- 类型:可选\n- 描述:如果您手动配置了 DeepSeek API 代理,可以使用此配置项覆盖默认的 DeepSeek API 请求基础 URL\n- 默认值:`https://api.deepseek.com`\n- 示例:`https://my-deepseek-proxy.com`\n\n### `DEEPSEEK_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 DeepSeek AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`sk-xxxxxx...xxxxxx`\n\n### `DEEPSEEK_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+deepseek-reasoner`\n\n## XAI\n\n### `XAI_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 XAI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xai-xxxxxx...xxxxxx`\n\n## 文心一言\n\n### `WENXIN_API_KEY`\n\n- 类型:必选\n- 描述:这是你在百度智能云平台申请的文心一言 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## OpenRouter AI\n\n### `OPENROUTER_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 OpenRouter AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`sk-or-v1-xxxxxx...xxxxxx=`\n\n### `OPENROUTER_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta`\n\n## PPIO\n\n### `PPIO_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 PPIO 网站申请的 API 密钥\n- 默认值:-\n- 示例:`sk_xxxxxxxxxxxx`\n\n### `PPIO_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+deepseek/deepseek-v3/community,+deepseek/deepseek-r1-distill-llama-70b`\n\n## Github\n\n### `GITHUB_TOKEN`\n\n- 类型:必选\n- 描述:这是你在 Github 申请的 Personal access tokens\n- 默认值:-\n- 示例:`ghp_xxxxxx...xxxxxx=`\n\n### `GITHUB_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+gpt-4o,+gpt-4o-mini`\n\n## TogetherAI\n\n### `TOGETHERAI_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 TogetherAI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n### `TOGETHERAI_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo,+meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`\n\n## Fireworks AI\n\n### `FIREWORKSAI_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Fireworks AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n### `FIREWORKSAI_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1`\n\n## Ollama\n\n### `ENABLED_OLLAMA`\n\n- 类型:可选\n- 描述:默认启用 Ollama 作为模型供应商,当设为 0 时关闭 Ollama 服务\n- 默认值:`1`\n- 示例:`0`\n\n### `OLLAMA_PROXY_URL`\n\n- 类型:必选\n- 描述:用于启用 Ollama 服务,设置后可在语言模型列表内展示可选开源语言模型,也可以指定自定义语言模型\n- 默认值:-\n- 示例:`http://127.0.0.1:11434`\n\n### `OLLAMA_MODEL_LIST`\n\n- 类型:可选\n- 描述:用于指定自定义 Ollama 语言模型。模型定义语法规则见 [模型列表][model-list]\n- 默认值:-\n- 示例:`qwen:32B`\n\n## Moonshot AI\n\n### `MOONSHOT_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Moonshot AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=`\n\n### `MOONSHOT_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Moonshot 接口代理,可以使用此配置项来覆盖默认的 Moonshot API 请求基础 URL\n- 默认值:`https://api.moonshot.cn/v1`\n- 示例:`https://my-moonshot-proxy.com/v1`\n\n## Perplexity AI\n\n### `PERPLEXITY_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Perplexity AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`pplx-xxxxxx...xxxxxx`\n\n### `PERPLEXITY_MODEL_LIST`\n\n- 类型:可选\n- 描述:用于指定自定义 Perplexity 语言模型。模型定义语法规则见 [模型列表][model-list]\n- 默认值:-\n- 示例: `-all,+llama-3.1-sonar-small-128k-online,+llama-3.1-sonar-small-128k-chat`\n\n### `PERPLEXITY_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Perplexity 接口代理,可以使用此配置项来覆盖默认的 Perplexity API 请求基础 URL\n- 默认值:`https://api.Perplexity.ai`\n- 示例:`https://my-Perplexity-proxy.com`\n\n## Minimax AI\n\n### `MINIMAX_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Minimax AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## Mistral AI\n\n### `MISTRAL_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Mistral AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx=`\n\n## Groq AI\n\n### `GROQ_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Groq AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`gsk_xxxxxx...xxxxxx`\n\n### `GROQ_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+gemma2-9b-it,+llama-3.1-8b-instant`\n\n### `GROQ_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Groq 接口代理,可以使用此配置项来覆盖默认的 Groq API 请求基础 URL\n- 默认值:`https://api.groq.com/openai/v1`\n- 示例:`https://my-groq-proxy.com/v1`\n\n## 智谱 AI\n\n### `ZHIPU_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 智谱 AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT`\n\n### `ZHIPU_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+glm-4-alltools,+glm-4-plus`\n\n## 01 AI\n\n### `ZEROONE_API_KEY`\n\n- 类型:必选\n- 描述:这是你在零一万物服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n### `ZEROONE_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+yi-large,+yi-large-rag`\n\n## 七牛云\n\n### `QINIU_API_KEY`\n\n- 类型:必选\n- 描述:这是你在七牛云上获取的 API 密钥\n- 默认值:-\n- 示例:`sk-xxxxx...xxxxx`\n\n### `QINIU_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+deepseek-r1,+deepseek-v3`\n\n### `QINIU_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Qiniu 接口代理,可以使用此配置项来覆盖默认的 Qiniu API 请求基础 URL\n- 默认值:`https://api.qnaigc.com/v1`\n- 示例:`https://my-qnaigc.com/v1`\n\n## 通义千问\n\n### `QWEN_API_KEY`\n\n- 类型:必选\n- 描述:这是你在阿里云百炼平台上获取的 DashScope API 密钥\n- 默认值:-\n- 示例:`sk-xxxxx...xxxxx`\n\n### `QWEN_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+qwen-turbo-latest,+qwen-plus-latest`\n\n### `QWEN_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Qwen 接口代理,可以使用此配置项来覆盖默认的 Qwen API 请求基础 URL\n- 默认值:`https://dashscope.aliyuncs.com/compatible-mode/v1`\n- 示例:`https://my-qwen-proxy.com/v1`\n\n## Stepfun AI\n\n### `STEPFUN_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Stepfun AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## Novita AI\n\n### `NOVITA_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Novita AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n### `NOVITA_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instruct`\n\n## 百川\n\n### `BAICHUAN_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 百川智能 服务平台申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## 紫东太初\n\n### `TAICHU_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 紫东太初 服务平台申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## 360 AI\n\n### `AI360_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 360 智脑 服务平台申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## Siliconflow\n\n### `SILICONCLOUD_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Siliconflow 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n### `SILICONCLOUD_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+deepseek-ai/DeepSeek-V2.5,+Qwen/Qwen2.5-7B-Instruct`\n\n### `SILICONCLOUD_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Siliconflow 接口代理,可以使用此配置项来覆盖默认的 Siliconflow API 请求基础 URL\n- 默认值:`https://api.siliconflow.cn/v1`\n- 示例:`https://my-siliconflow-proxy.com/v1`\n\n## Upstage AI\n\n### `UPSTAGE_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Upstage AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## Spark AI\n\n### `SPARK_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 Spark AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## A21 AI\n\n### `AI21_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 A21 AI 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n## 腾讯混元\n\n### `HUNYUAN_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 腾讯混元 服务中申请的 API 密钥\n- 默认值:-\n- 示例:`xxxxxx...xxxxxx`\n\n### `HUNYUAN_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+hunyuan-lite,+hunyuan-standard`\n\n## 火山引擎\n\n### `VOLCENGINE_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 火山引擎 服务中申请的 API 密钥,可以前往 [这里](https://console.volcengine.com/ark/region:ark+cn-beijing/endpoint) 查看\n- 默认值:-\n- 示例:`ad925b3d-aaaa-bbbb-cccc-51fde2f50547`\n\n### `VOLCENGINE_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名->部署名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+deepseek-r1->deepseek-r1-250120,+deepseek-v3->deepseek-v3-250324,+doubao-1.5-pro-256k->doubao-1-5-pro-256k-250115,+doubao-1.5-pro-32k->doubao-1-5-pro-32k-250115,+doubao-1.5-lite-32k->doubao-1-5-lite-32k-250115`\n\n### `VOLCENGINE_PROXY_URL`\n\n- 类型:可选\n- 描述:如果你手动配置了 Volcengine 接口代理,可以使用此配置项来覆盖默认的 Volcengine API 请求基础 URL\n- 默认值:`https://ark.cn-beijing.volces.com/api/v3`\n- 示例:`https://my-volcengine-proxy.com/v1`\n\n## InfiniAI\n\n### `INFINIAI_API_KEY`\n\n- 类型:必选\n- 描述:这是你在 [Infini-AI](https://cloud.infini-ai.com) 申请的 API 密钥。\n- 默认值:-\n- 示例:`sk-xxxxxx...xxxxxx`\n\n### `INFINIAI_MODEL_LIST`\n\n- 类型:可选\n- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名->部署名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]\n- 默认值:`-`\n- 示例:`-all,+qwq-32b,+deepseek-r1`\n\n[model-list]: /zh/docs/self-hosting/advanced/model-list\n"}}}} |