Allow overriding gateway URL (#169)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"clean": "rm -rf out && rm -rf scaffold/node_modules",
|
||||
"start": "electron-forge start",
|
||||
"dev:engine": "DYAD_LOCAL_ENGINE=http://localhost:8080/v1 npm start",
|
||||
"staging:gateway": "DYAD_GATEWAY_URL=https://staging---litellm-gcp-cloud-run-kq7pivehnq-uc.a.run.app/v1 npm start",
|
||||
"package": "npm run clean && electron-forge package",
|
||||
"make": "npm run clean && electron-forge make",
|
||||
"publish": "npm run clean && electron-forge publish",
|
||||
|
||||
@@ -14,6 +14,7 @@ import { llmErrorStore } from "@/main/llm_error_store";
|
||||
import { createDyadEngine } from "./llm_engine_provider";
|
||||
|
||||
const dyadLocalEngine = process.env.DYAD_LOCAL_ENGINE;
|
||||
const dyadGatewayUrl = process.env.DYAD_GATEWAY_URL;
|
||||
|
||||
const AUTO_MODELS = [
|
||||
{
|
||||
@@ -105,7 +106,7 @@ export async function getModelClient(
|
||||
})
|
||||
: createOpenAI({
|
||||
apiKey: dyadApiKey,
|
||||
baseURL: "https://llm-gateway.dyad.sh/v1",
|
||||
baseURL: dyadGatewayUrl ?? "https://llm-gateway.dyad.sh/v1",
|
||||
});
|
||||
|
||||
logger.info(
|
||||
|
||||
Reference in New Issue
Block a user