docs/self-hosting/environment-variables/model-provider.mdx
When deploying LobeHub, 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 LobeHub.
ENABLED_OPENAI010OPENAI_API_KEYsk-xxxxxx...xxxxxxOPENAI_PROXY_URLhttps://api.openai.com/v1https://api.chatanywhere.cn or https://aihubmix.com/v1<Callout type={'warning'}>
Please check the request suffix of your proxy service provider. Some proxy service providers may
add /v1 to the request suffix, while others may not. If you find that the AI returns an empty
message during testing, try adding the /v1 suffix and retry.
</Callout>
<Callout type={'info'}>
Whether to fill in /v1 is closely related to the model service provider. For example, the
default address of openai is api.openai.com/v1. If your proxy forwards the /v1 interface, you
can simply fill in proxy.com. However, if the model service provider directly forwards the
api.openai.com domain, then you need to add /v1 to the URL yourself.
</Callout>
Related discussions:
OPENAI_MODEL_LIST+ 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-+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turboThe 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.
You can find all current model names in modelProviders.
If you need to use Azure OpenAI to provide model services, you can refer to the Deploying with Azure OpenAI section for detailed steps. Here, we will list the environment variables related to Azure OpenAI.
AZURE_API_KEYc55168be3874490ef0565d9779ecd5a6AZURE_ENDPOINT-https://docs-test-001.openai.azure.comAZURE_API_VERSION-2023-02-01, refer to latest versionAZURE_MODEL_LIST+ 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-gpt-35-turbo->my-deploy=GPT 3.5 Turbo 或 gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>GOOGLE_API_KEYAIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQEGOOGLE_PROXY_URLhttps://generativelanguage.googleapis.comhttps://api.genai.gd.edu.kg/googleGOOGLE_MODEL_LIST+ 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--all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latestVERTEXAI_CREDENTIALS{"type": "service_account", "project_id": "your-gcp-project-id", ...}VERTEXAI_PROJECTproject_id field in VERTEXAI_CREDENTIALS.your-gcp-project-idVERTEXAI_LOCATIONglobalus-central1VERTEXAI_MODEL_LIST+ 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--all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latestANTHROPIC_API_KEYsk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxANTHROPIC_PROXY_URLhttps://api.anthropic.comhttps://my-anthropic-proxy.comENABLED_AWS_BEDROCK101AWS_ACCESS_KEY_IDAKIA5STVRLFSB4S9HWBRAWS_SECRET_ACCESS_KEYTh3vXxLYpuKcv2BARktPSTPxx+jbSiFT6/0w7oECAWS_REGIONus-east-1us-east-1DEEPSEEK_PROXY_URLhttps://api.deepseek.comhttps://my-deepseek-proxy.comDEEPSEEK_API_KEYsk-xxxxxx...xxxxxxDEEPSEEK_MODEL_LIST+ 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--all,+deepseek-reasonerXAI_API_KEYxai-xxxxxx...xxxxxxWENXIN_API_KEYxxxxxx...xxxxxxOPENROUTER_API_KEYsk-or-v1-xxxxxx...xxxxxx=OPENROUTER_MODEL_LIST--all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-betaPPIO_API_KEYsk_xxxxxxxxxxPPIO_MODEL_LIST+ 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--all,+deepseek/deepseek-v3/community,+deepseek/deepseek-r1-distill-llama-70bGITHUB_TOKEN-ghp_xxxxxx...xxxxxx=GITHUB_MODEL_LIST+ 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--all,+gpt-4o,+gpt-4o-miniTOGETHERAI_API_KEYxxxxxx...xxxxxxTOGETHERAI_MODEL_LIST--all,+meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo,+meta-llama/Meta-Llama-3.1-70B-Instruct-TurboFIREWORKSAI_API_KEY-xxxxxx...xxxxxxFIREWORKSAI_MODEL_LIST+ 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--all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1ENABLED_OLLAMA010OLLAMA_PROXY_URLhttp://127.0.0.1:11434OLLAMA_MODEL_LISTllama2:7BMOONSHOT_API_KEYY2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=MOONSHOT_PROXY_URLhttps://api.moonshot.cn/v1https://my-moonshot-proxy.com/v1PERPLEXITY_API_KEYpplx-xxxxxx...xxxxxxPERPLEXITY_PROXY_URLhttps://api.Perplexity.aihttps://my-Perplexity-proxy.comPERPLEXITY_MODEL_LIST+ 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--all,+llama-3.1-sonar-small-128k-online,+llama-3.1-sonar-small-128k-chatMINIMAX_API_KEYxxxxxx...xxxxxxMISTRAL_API_KEYxxxxxx...xxxxxx=GROQ_API_KEYgsk_xxxxxx...xxxxxxGROQ_PROXY_URLhttps://api.groq.com/openai/v1https://my-groq-proxy.com/v1GROQ_MODEL_LIST+ 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--all,+gemma2-9b-it,+llama-3.1-8b-instantZHIPU_API_KEY4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVTZHIPU_MODEL_LIST+ 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--all,+glm-4-alltools,+glm-4-plusZEROONE_API_KEYxxxxxx...xxxxxxZEROONE_MODEL_LIST+ 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--all,+yi-large,+yi-large-ragQINIU_API_KEYsk-xxxxx...xxxxxQINIU_MODEL_LIST+ 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--all,+deepseek-r1,+deepseek-v3QINIU_PROXY_URLhttps://api.qnaigc.com/v1https://my-qnaigc.com/v1QWEN_API_KEYsk-xxxxx...xxxxxQWEN_MODEL_LIST+ 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. The deploymentName ->deploymentName can be omitted, and it defaults to the latest model version. Definition syntax rules see model-list--all,+qwen-turbo,+qwen-plus,+qwen-max->qwen-max-2025-01-25QWEN_PROXY_URLhttps://dashscope.aliyuncs.com/compatible-mode/v1https://my-qwen-proxy.com/v1STEPFUN_API_KEYsk-xxxxx...xxxxxNOVITA_API_KEYxxxxxx...xxxxxxNOVITA_MODEL_LIST+ 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--all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instructBAICHUAN_API_KEYxxxxxx...xxxxxxTAICHU_API_KEYxxxxxx...xxxxxxAI360_API_KEYxxxxxx...xxxxxxSILICONCLOUD_API_KEYxxxxxx...xxxxxxSILICONCLOUD_PROXY_URLhttps://api.siliconflow.cn/v1https://my-siliconflow-proxy.com/v1SILICONCLOUD_MODEL_LIST+ 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--all,+deepseek-ai/DeepSeek-V2.5,+Qwen/Qwen2.5-7B-InstructUPSTAGE_API_KEYxxxxxx...xxxxxxSPARK_API_KEYxxxxxx...xxxxxxAI21_API_KEYAI21_API_KEY servicexxxxxx...xxxxxxHUNYUAN_API_KEYxxxxxx...xxxxxxHUNYUAN_MODEL_LIST+ 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--all,+hunyuan-lite,+hunyuan-standardVOLCENGINE_API_KEYad925b3d-aaaa-bbbb-cccc-51fde2f50547VOLCENGINE_MODEL_LIST+ 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. The deploymentName ->deploymentName can be omitted, and it defaults to the latest model version. Definition syntax rules see model-list--all,+deepseek-r1,+deepseek-v3->deepseek-v3-250324,+doubao-1.5-pro-256k,+doubao-1.5-pro-32k->doubao-1-5-pro-32k-250115,+doubao-1.5-lite-32kVOLCENGINE_PROXY_URLhttps://ark.cn-beijing.volces.com/api/v3https://my-volcengine-proxy.com/v1INFINIAI_API_KEYsk-xxxxxx...xxxxxxINFINIAI_MODEL_LIST+ 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--all,+qwq-32b,+deepseek-r1ENABLED_FAL0 to disable the FAL service.10FAL_API_KEYfal-xxxxxx...xxxxxxFAL_MODEL_LIST+ to add a model, - to hide a model, and model_name=display_name to customize the display name of a model. Separate multiple entries with commas. The definition syntax follows the same rules as other providers' model lists.--all,+fal-ai/flux/schnell,+fal-ai/flux-pro/kontext=FLUX.1 Kontext [pro]The above example disables all models first, then enables fal-ai/flux/schnell and fal-ai/flux-pro/kontext (displayed as FLUX.1 Kontext [pro]).
ENABLED_COMFYUI0 to disable the ComfyUI service.10COMFYUI_BASE_URLhttp://localhost:8188http://192.168.1.100:8188 or https://my-comfyui-server.comCOMFYUI_AUTH_TYPEnone: No authentication (default)basic: Basic authentication (username + password)bearer: Bearer Token authentication (API key)custom: Custom request header authenticationnonebasicCOMFYUI_API_KEYbearersk-xxxxxx...xxxxxxCOMFYUI_USERNAMEbasicadminCOMFYUI_PASSWORDbasicpassword123COMFYUI_CUSTOM_HEADERScustom, requires JSON format string{"X-Auth-Token": "your-token", "X-Custom-Header": "value"}<Callout type={'info'}> ComfyUI supports multiple authentication methods. Please choose the appropriate authentication type and corresponding authentication parameters according to your ComfyUI service configuration. If your ComfyUI service has no authentication set up, you can skip configuring authentication-related environment variables. </Callout>
BFL_API_KEY12345678-1234-1234-1234-123456789abcBFL_MODEL_LIST+ to add a model, - to hide a model, and model_name=display_name to customize the display name of a model. Separate multiple entries with commas. The definition syntax follows the same rules as other providers' model lists.--all,+flux-pro-1.1,+flux-kontext-pro=FLUX.1 Kontext [pro]The above example disables all models first, then enables flux-pro-1.1 and flux-kontext-pro (displayed as FLUX.1 Kontext [pro]).
NEWAPI_API_KEYsk-xxxxxx...xxxxxxNEWAPI_PROXY_URLhttps://your-newapi-server.com/NewAPI is a multi-provider model aggregation service that supports automatic model routing based on provider detection. It offers cost management features and provides a single endpoint for accessing models from multiple providers including OpenAI, Anthropic, Google, and more. Learn more about NewAPI at https://github.com/Calcium-Ion/new-api.
VERCELAIGATEWAY_API_KEYvck_xxxxxx...xxxxxxVERCELAIGATEWAY_MODEL_LIST+ to add a model, - to hide a model, and model_name=display_name to customize the display name of a model. Separate multiple entries with commas. The definition syntax follows the same rules as other providers' model lists.--all,+vercel-model-1,+vercel-model-2=vercel-specialCEREBRAS_API_KEYcsk-xxxxxx...xxxxxxCEREBRAS_MODEL_LIST+ to add a model, - to hide a model, and model_name=display_name to customize the display name of a model. Separate multiple entries with commas. The definition syntax follows the same rules as other providers' model lists.--all,+cerebras-model-1,+cerebras-model-2=cerebras-specialAIHUBMIX_API_KEYsk-xxxxxx...xxxxxxAIHUBMIX_MODEL_LIST+ to add a model, - to hide a model, and model_name=display_name to customize the display name of a model. Separate multiple entries with commas. The definition syntax follows the same rules as other providers' model lists.--all,+claude-opus-4-1-20250805,+claude-opus-4-20250514=claude-opus-4STRAICO_API_KEYsk-xxxxxx...xxxxxxSTRAICO_MODEL_LIST+ to add a model, - to hide a model, and model_name=display_name to customize the display name of a model. Separate multiple entries with commas. The definition syntax follows the same rules as other providers' model lists.--all,+straico-model-1,+straico-model-2=straico-special