mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Electron ENV fix
Allow OPENAI_LIKE_API_* through Electron env variables.
This commit is contained in:
parent
840f35cbbc
commit
2811be37bb
@ -16,7 +16,11 @@ export default class OpenAILikeProvider extends BaseProvider {
|
|||||||
staticModels: ModelInfo[] = [];
|
staticModels: ModelInfo[] = [];
|
||||||
|
|
||||||
getEnvDefinedModels(serverEnv: Record<string, string> = {}): ModelInfo[] {
|
getEnvDefinedModels(serverEnv: Record<string, string> = {}): ModelInfo[] {
|
||||||
const models = serverEnv[this.config.modelKey] || process.env[this.config.modelKey];
|
const models =
|
||||||
|
serverEnv[this.config.modelKey] ||
|
||||||
|
process.env[this.config.modelKey] ||
|
||||||
|
import.meta.env[this.config.modelKey] ||
|
||||||
|
'';
|
||||||
console.debug(`${this.name}: ${this.config.modelKey}=${models}`);
|
console.debug(`${this.name}: ${this.config.modelKey}=${models}`);
|
||||||
|
|
||||||
const mklabel = (model: string) => {
|
const mklabel = (model: string) => {
|
||||||
|
@ -59,7 +59,7 @@ export default defineConfig((config) => {
|
|||||||
],
|
],
|
||||||
envPrefix: [
|
envPrefix: [
|
||||||
'VITE_',
|
'VITE_',
|
||||||
'OPENAI_LIKE_API_BASE_URL',
|
'OPENAI_LIKE_API_',
|
||||||
'OLLAMA_API_BASE_URL',
|
'OLLAMA_API_BASE_URL',
|
||||||
'LMSTUDIO_API_BASE_URL',
|
'LMSTUDIO_API_BASE_URL',
|
||||||
'TOGETHER_API_BASE_URL',
|
'TOGETHER_API_BASE_URL',
|
||||||
|
Loading…
Reference in New Issue
Block a user