Skip to content

Commit 3b100d4

Browse files
committed
fix: fallback openrouter key
Matches how we do it for other endpoints, avoids codegen issues.
1 parent 22254f3 commit 3b100d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/backend/src/lib/email-template-rewrite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const MOCK_API_KEY_SENTINEL = "mock-openrouter-api-key";
1111
const AI_REQUEST_TIMEOUT_MS = 120_000;
1212
const MAX_REWRITE_ATTEMPTS = 3;
1313

14-
const apiKey = getEnvVariable("STACK_OPENROUTER_API_KEY");
14+
const apiKey = getEnvVariable("STACK_OPENROUTER_API_KEY", MOCK_API_KEY_SENTINEL);
1515
const isMockMode = apiKey === MOCK_API_KEY_SENTINEL;
1616
const openai = isMockMode ? null : createOpenAI({
1717
apiKey,

0 commit comments

Comments
 (0)