Skip to content

Commit f4edcd5

Browse files
committed
server side API fixed
1 parent 369bfb5 commit f4edcd5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/lib/openrouter.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55

66
// Environment variables should be set in your .env.local file
7-
const OPENROUTER_API_KEY = process.env.OPENROUTER_API_KEY || '';
87
const OPENROUTER_BASE_URL = 'https://openrouter.ai/api/v1';
98

109
/**
@@ -120,10 +119,6 @@ export async function generateDocumentation(
120119
extraInstructions?: string;
121120
}
122121
): Promise<Array<{filename: string; content: string}>> {
123-
if (!OPENROUTER_API_KEY) {
124-
throw new Error('OpenRouter API key is not set. Please set OPENROUTER_API_KEY in your .env.local file.');
125-
}
126-
127122
console.log('🚀 Generating documentation with model:', model);
128123
console.log('🚀 File type:', options.fileType);
129124
console.log('🚀 Template:', options.template || 'None specified');

0 commit comments

Comments
 (0)