Skip to content

fix(ai-gateway-provider): add createGoogle alias for createGoogleGenerativeAI#516

Open
qubeena07 wants to merge 1 commit intocloudflare:mainfrom
qubeena07:fix/add-create-google-alias
Open

fix(ai-gateway-provider): add createGoogle alias for createGoogleGenerativeAI#516
qubeena07 wants to merge 1 commit intocloudflare:mainfrom
qubeena07:fix/add-create-google-alias

Conversation

@qubeena07
Copy link
Copy Markdown

Summary

  • Adds createGoogle as a convenience alias for createGoogleGenerativeAI in the Google provider
  • Exports createGoogle from providers/index.ts alongside the existing export
  • Adds a Google AI Studio usage example to the README

Problem

The Cloudflare dashboard shows example code using createGoogle(), but the package only exported createGoogleGenerativeAI(). Users following the dashboard example got a runtime error.

Solution

Both names now work interchangeably:

import { createGoogle } from "ai-gateway-provider/providers/google";
// or
import { createGoogleGenerativeAI } from "ai-gateway-provider/providers/google";

Closes #392

Test plan

  • pnpm build passes
  • All 13 existing tests pass (pnpm test)
  • createGoogle appears in built .d.mts type definitions

…rativeAI

Adds `createGoogle` as a convenience alias so that the Cloudflare
dashboard example code works without modification. Both names are
now valid and interchangeable. Also adds a Google AI Studio usage
example to the README.

Fixes cloudflare#392
@qubeena07 qubeena07 requested a review from G4brym as a code owner April 29, 2026 02:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

🦋 Changeset detected

Latest commit: 98e5885

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ai-gateway-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix dashboard example createGoogle()

1 participant