Luca448 Claude Sonnet 5 commited on
Commit
8ee7a26
·
1 Parent(s): 417df72

fix: read Tavily key from TAVILY_API_KEY_2

Browse files

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Files changed (1) hide show
  1. server.js +3 -3
server.js CHANGED
@@ -238,16 +238,16 @@ app.post('/api/notes/chat/completions', async (req, res) => {
238
  }
239
  });
240
 
241
- // General Web Search Proxy (Tavily) � keeps TAVILY_API_KEY server-side.
242
  // Fallback for the Notes agent's search_web tool when Wikipedia has no hit
243
  // (current events, niche topics). Trimmed to a few short extracts per result
244
  // here already, so the token cost is paid once, not per client.
245
  app.post('/api/notes/search', async (req, res) => {
246
  if (!checkNotesAccess(req, res)) return;
247
 
248
- const apiKey = process.env.TAVILY_API_KEY;
249
  if (!apiKey) {
250
- return res.status(500).json({ error: { message: 'TAVILY_API_KEY ist im Space nicht gesetzt' } });
251
  }
252
 
253
  const query = String(req.body?.query || '').trim();
 
238
  }
239
  });
240
 
241
+ // General Web Search Proxy (Tavily) � keeps TAVILY_API_KEY_2 server-side.
242
  // Fallback for the Notes agent's search_web tool when Wikipedia has no hit
243
  // (current events, niche topics). Trimmed to a few short extracts per result
244
  // here already, so the token cost is paid once, not per client.
245
  app.post('/api/notes/search', async (req, res) => {
246
  if (!checkNotesAccess(req, res)) return;
247
 
248
+ const apiKey = process.env.TAVILY_API_KEY_2;
249
  if (!apiKey) {
250
+ return res.status(500).json({ error: { message: 'TAVILY_API_KEY_2 ist im Space nicht gesetzt' } });
251
  }
252
 
253
  const query = String(req.body?.query || '').trim();