fix(research): default Gemini to 2.5-flash (2.0-flash deprecated for new users)

Google deprecated `gemini-2.0-flash` for new API users — existing
accounts still work, but a freshly-billed key returns 404
"models/gemini-2.0-flash is no longer available to new users". The
working replacement is `gemini-2.5-flash` (same price tier, better
quality, groundingMetadata shape unchanged).

Verified live: the fix produced a real answer with 6 grounding
citations in 2.6s.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-18 17:01:24 +02:00
parent dcec0d31ee
commit 85537cb92a

View file

@ -8,7 +8,7 @@
import type { Citation, ResearchAgent } from '@mana/shared-research';
import { ProviderError, ProviderNotConfiguredError } from '../../lib/errors';
const DEFAULT_MODEL = 'gemini-2.0-flash';
const DEFAULT_MODEL = 'gemini-2.5-flash';
interface GeminiResponse {
candidates?: Array<{