diff --git a/src/lib/gemini-live.ts b/src/lib/gemini-live.ts index 2aadfd5..34df263 100644 --- a/src/lib/gemini-live.ts +++ b/src/lib/gemini-live.ts @@ -1,4 +1,4 @@ -import { GoogleGenAI, Type } from '@google/genai'; +import { Type } from '@google/genai'; // ─── Constants ──────────────────────────────────────────────────────────────── @@ -152,13 +152,7 @@ export function buildLiveConfig(locale: string) { // ─── Ephemeral Token ────────────────────────────────────────────────────────── -export async function generateEphemeralToken(locale: string) { - // GoogleGenAI is instantiated here to validate the API key at request time. - // The SDK does not yet expose an ephemeral token API; in production, replace - // this with ai.auth.tokens.create() or equivalent when available to avoid - // exposing the API key to the client. - new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY! }); - +export function generateEphemeralToken(locale: string) { const config = buildLiveConfig(locale); return { config, model: GEMINI_LIVE_MODEL }; }