Skip to content

Unable to set providerOptions for gemini thinkingConfig #12

@philn-delphia

Description

@philn-delphia

When swapping out the google generative AI provider with portkey, streamText is no longer passing providerOptions and I no longer get reasoning in my response.

e.g.:

  const portkey = createPortkey({
    apiKey: "xxx",
    provider: "google",
    virtualKey: "xxx",
  })
  const model = portkey.chatModel("gemini-2.5-flash")

  const providerOptions = {
    google: {
      thinkingConfig: {
        includeThoughts: true,
      },
    },
  }

  const result = streamText({
    model,
    providerOptions,
    system: "You are a helpful assistant.",
    prompt: "Explain what a portkey is."
  })

  for await (const chunk of result.textStream) {
    console.log(chunk)
  }
  console.log(result.reasoning)

With the vercel google generative AI provider I can see results in result.reasoning but not with the portkey provider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions