Luca448 Claude Sonnet 5 commited on
Commit
c768e67
·
1 Parent(s): 6615fc5

fix: only disable reasoning for non-Gemini models in Notes proxy

Browse files

Gemini 3.x rejects reasoning:false with a 400 ("Reasoning is
mandatory for this endpoint"), so every Gemini request through the
proxy was failing and silently falling back to DeepSeek — which is
why DeepSeek "always worked" regardless of the model picked in the
app. DeepSeek keeps reasoning disabled; Gemini models now go through
without the flag.

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

Files changed (1) hide show
  1. server.js +3 -1
server.js CHANGED
@@ -244,7 +244,9 @@ app.post('/api/notes/chat/completions', async (req, res) => {
244
  // "erfindet" dann Tool-Aufrufe als Klartext (<searchweb>...</searchweb>)
245
  // statt sie strukturiert als tool_calls zurückzugeben.
246
  provider: { data_collection: 'deny', sort: 'price', require_parameters: true },
247
- reasoning: { enabled: false },
 
 
248
  }),
249
  });
250
  const data = await upstream.json();
 
244
  // "erfindet" dann Tool-Aufrufe als Klartext (<searchweb>...</searchweb>)
245
  // statt sie strukturiert als tool_calls zurückzugeben.
246
  provider: { data_collection: 'deny', sort: 'price', require_parameters: true },
247
+ // Reasoning ist bei Gemini 3.x Pflicht (Anfrage schlägt sonst mit 400 fehl),
248
+ // DeepSeek läuft ohne. Nur für Nicht-Gemini-Modelle abschalten.
249
+ ...(models[0].startsWith('google/') ? {} : { reasoning: { enabled: false } }),
250
  }),
251
  });
252
  const data = await upstream.json();