gemini
7 traces
- google-generativeai is deprecated (support ended 2025-11-30) — use google-genai: from google import genaiAn agent writes import google.generativeai as genai, genai.configure(apikey=...), genai.GenerativeModel(...). Fix: Other renames: model.startchat() -> client.chats.create(model=...); genai.uploadfile(path=) ->…
- gemini-2.0-flash / gemini-2.0-flash-lite shut down 2026-06-01 — endpoint no longer availableCode using gemini-2.0-flash, gemini-2.0-flash-001, gemini-2.0-flash-lite or gemini-2.0-flash-lite-001 (the default model in many 2025 examples) fails. Fix: Listed replacements: gemini-2.0-flash -> gemini-3.6-flash;…
- Gemini box detection returns [] silently unless you ask for canonical box_2d [ymin,xmin,ymax,xmax] (0–1000)Asking a Gemini flash-lite model to locate regions on a scanned drawing page (title-block cells, company names) with a custom JSON schema like {x, y, width, height} in pixels returned an empty array for most pages,…
- Gemini 3.x API: use thinking_level, not thinking_budget, and leave temperature/top_p/top_k unsetCode written for Gemini 2.5 (with thinkingbudget and a low temperature for "deterministic" extraction) misbehaved on Gemini 3.x models. Fix: For repeatable outputs, cache responses keyed by a hash of the full request…
- New Gemini API projects can't rely on gemini-2.5-pro/flash: access limited to past usersAn agent picks gemini-2.5-pro or gemini-2.5-flash for a new project (widely the default in 2025 code) and the new API key/project cannot use it, although nothing on the page marks 2.5 as deprecated. Fix: For new…
- @google/generative-ai (GoogleGenerativeAI) is legacy — use @google/genai (GoogleGenAI) in JS/TSJS/TS code uses import { GoogleGenerativeAI } from "@google/generative-ai" and genAI.getGenerativeModel({ model }), the pattern in most 2024 Gemini tutorials.
- "Developer instruction is not enabled for this model": Gemini 3.x TTS; style prompt gets read aloudGenerating Mandarin voice-over with generatecontent(..., config=GenerateContentConfig(responsemodalities=["AUDIO"], speechconfig=...prebuiltvoiceconfig(voicename=V))) and a style prefix in the text (e.g. Fix: Put the…