{"record":{"id":"5bbb753fc87027b6","repo":"vercel/ai","slug":"google-generative-ai-api-key-is-required-for-strea-5bbb75","errorCode":null,"errorMessage":"Google Generative AI API key is required for streaming transcription.","messagePattern":"Google Generative AI API key is required for streaming transcription\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/google/src/transcription/google-transcription-model.ts","lineNumber":269,"sourceCode":"    const warnings: SharedV4Warning[] = [];\n    const googleOptions = await this.parseOptions(options.providerOptions);\n\n    validateLiveInputAudioFormat(options.inputAudioFormat);\n\n    const headers = combineHeaders(\n      this.config.headers ? await resolve(this.config.headers) : undefined,\n      options.headers,\n    );\n    // last case-variant wins: combineHeaders keeps case-distinct keys and\n    // spreads per-call headers after configuration headers\n    let apiKey: string | undefined;\n    for (const [key, value] of Object.entries(headers)) {\n      if (key.toLowerCase() === 'x-goog-api-key' && value != null) {\n        apiKey = value;\n      }\n    }\n    if (apiKey == null) {\n      throw new Error(\n        'Google Generative AI API key is required for streaming transcription.',\n      );\n    }\n    const webSocketHeaders = Object.fromEntries(\n      Object.entries(headers).filter(\n        ([key]) => key.toLowerCase() !== 'x-goog-api-key',\n      ),\n    );\n\n    // NOTE: Google's GA announcement shows the setup with\n    // `generationConfig: { responseModalities: ['TEXT'] }`, but sending it\n    // suppresses the final `inputTranscription` segments on the current\n    // endpoint (only interim partials arrive). Omit generationConfig — the\n    // empirically working shape — until the endpoint honors the documented\n    // form.\n    const setup = {\n      model: getModelPath(this.modelId),\n      inputAudioTranscription:","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/google/src/transcription/google-transcription-model.ts#L251-L287","documentation":"Error \"Google Generative AI API key is required for streaming transcription.\" thrown in vercel/ai.","triggerScenarios":"Thrown at packages/google/src/transcription/google-transcription-model.ts:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}