@ai-sdk/google 3.0.123 → 3.0.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/google",
3
- "version": "3.0.123",
3
+ "version": "3.0.124",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -392,10 +392,15 @@ export class GoogleGenerativeAILanguageModel implements LanguageModelV3 {
392
392
 
393
393
  const candidate = response.candidates?.[0];
394
394
  const promptBlockReason = response.promptFeedback?.blockReason;
395
+ const confirmedPromptBlockReason = isConfirmedPromptBlockReason(
396
+ promptBlockReason,
397
+ )
398
+ ? promptBlockReason
399
+ : undefined;
395
400
  const isPromptBlocked =
396
- candidate?.finishReason == null && promptBlockReason != null;
401
+ candidate?.finishReason == null && confirmedPromptBlockReason != null;
397
402
  const rawFinishReason =
398
- candidate?.finishReason ?? promptBlockReason ?? undefined;
403
+ candidate?.finishReason ?? confirmedPromptBlockReason;
399
404
  const content: Array<LanguageModelV3Content> = [];
400
405
 
401
406
  // map ordered parts to content: