Skip to content
Discussion options

You must be logged in to vote

For me it is working

import { google } from "@ai-sdk/google";
import type {
  GoogleGenerativeAIProviderMetadata,
  GoogleGenerativeAIProviderOptions,
} from "@ai-sdk/google";
import { generateText } from "ai";

const model = google("gemini-2.5-flash-preview-05-20", {
  useSearchGrounding: true,
  dynamicRetrievalConfig: {
    mode: "MODE_DYNAMIC",
    dynamicThreshold: 0,
  },
});

const { text, providerMetadata } = await generateText({
  model,
  messages: [
    {
      role: "user",
      content: "tell me more about vercel AI SDK and gemini?",
    },
  ],
  temperature: 0,
  seed: 420,
  providerOptions: {
    google: {
      thinkingConfig: {
        thinkingBudget: 0,
        includ…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Adebesin-Cell
Comment options

@Adebesin-Cell
Comment options

@patelvivekdev
Comment options

Answer selected by Adebesin-Cell
@Adebesin-Cell
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants