# vercel-labs/gemini-chatbot and the stack it locks in

> The Next.js chat template from vercel-labs ships Gemini as the compiled-in default along with auth, Postgres persistence and a migration inside the build script. Its dependency pins and its own README text disagree in small ways that matter when the fork is meant to outlive the demo.

**vercel-labs/gemini-chatbot** — Build your own generative UI chatbot using the Vercel AI SDK and Google Gemini

- Repository: https://github.com/vercel-labs/gemini-chatbot
- Website: https://gemini.vercel.ai
- Stars: 1,358 · Forks: 495
- Language: TypeScript
- License: NOASSERTION
- Published: 2026-10-14 · Updated: 2026-10-14 · Language: en
- Canonical page: https://hysenlabs.com/projects/vercel-labs-gemini-chatbot

## Gemini is wired in as the default, not as a swappable value

vercel-labs/gemini-chatbot is aimed at developers who want a working chat product on Vercel without assembling the App Router, the streaming layer and login themselves. The repository description calls it a way to build a generative UI chatbot using the Vercel AI SDK and Google Gemini, and the README names the Next.js 15 App Router with React Server Components and Server Actions, shadcn/ui on Tailwind CSS, Radix UI primitives and NextAuth.js as the pieces already assembled.

Package metadata frames it as an application rather than a dependency. The name is `gemini-chatbot`, the version is `0.1.0`, and `"private": true` keeps it out of any registry, so what you take from it is the source tree. Only one provider package appears in the dependencies, `@ai-sdk/google` at `^0.0.51`, which makes Gemini the compiled-in default rather than one option among several. Next.js 15.5.7 and React 19.2.1 are the framework underneath that default.

The one-click deploy button encodes its own narrower contract. Its env list asks for two secrets, `AUTH_SECRET` and `GOOGLE_GENERATIVE_AI_API_KEY`, while its store list requests a postgres store and a blob store. OpenAI, Anthropic and Cohere arrive later as edits to source code, not as values you can change in a settings screen, and no provider config file appears among the top-level entries.

The inspected template references Gemini 1.5 Pro. Google has retired Gemini 1.5 variants, so check current model availability and test a supported replacement rather than assuming the default still works.

## The build script migrates your database before Next.js compiles

`"build": "tsx db/migrate && next build"` is the entire build path, so schema changes are part of compiling the app rather than a step you have to remember. A db directory and `drizzle.config.ts` sit at the top level, `drizzle-orm` is a runtime dependency at version 0.34.0, and `drizzle-kit` is a development dependency at 0.25.0. That pairing is the persistence story in full: chat history and user rows live in a Postgres database reached through `POSTGRES_URL`, while Vercel Blob holds objects.

Two consequences follow from the single shell line. Because the two commands are joined by `&&`, `next build` runs only if the migration exits cleanly, so a build needs a reachable database and a set of credentials. And because the migration sits inside the build, every production deploy enters `db/migrate` again, with no flag documented to apply or skip schema changes outside a build. The remaining scripts stay conventional:

```json
"dev": "next dev --turbo",
"start": "next start",
"lint": "next lint"
```

## Vercel CLI first, pnpm install second

The local path runs three Vercel CLI commands before anything from the repository is installed. Install the CLI globally, link the folder to a Vercel project so a `.vercel` directory appears, then pull the environment values down into local files:

```bash
npm i -g vercel
vercel link
vercel env pull
```

With the variables in place, the repository itself starts with two commands, and the dev server answers on `localhost:3000`, port 3000 in development.

```bash
pnpm install
pnpm dev
```

Three details in that sequence deserve attention. The repository ships `pnpm-lock.yaml`, so pnpm is the package manager the lock file belongs to even though the CLI bootstrap uses npm. The README also states that a `.env` file is all that is necessary, which leaves the three Vercel commands optional for someone willing to fill in the keys by hand. It warns against committing `.env`, since doing so exposes secrets that let others control access to your Google Cloud and authentication provider accounts.

## Four environment variables, two of them Vercel storage

The `.env.example` file is the shortest honest description of what the app talks to. Four keys are declared for model access, authentication and storage:

```bash
GOOGLE_GENERATIVE_AI_API_KEY=****
AUTH_SECRET=****
BLOB_READ_WRITE_TOKEN=****
POSTGRES_URL=****
```

The Gemini key points at Google Cloud's Vertex AI page, and `AUTH_SECRET` carries its own instructions in a comment, either the openssl rand -base64 32 route or a hosted generator at generate-secret.vercel.app/32, so the value is base64 text rather than a passphrase you invent. The comment above `BLOB_READ_WRITE_TOKEN` links to the Vercel Blob documentation yet calls the target a kv database, a mismatch worth knowing before you go looking for a kv store that no key in this file references.

Both storage keys sit below a comment stating they are created automatically when you deploy on Vercel. That holds for the one-click path and not for a copy you run elsewhere: if you configure the app yourself, supply the appropriate database connection, Blob token, Google key and authentication secret. Confirm the storage providers and deployment requirements for the version you use.

## The opengraph image still advertises Next.js 14

Read the badge at the top of the README and you get a version the dependency list does not contain. The image markup carries the alt text `Next.js 14 and App Router-ready AI chatbot.` and links to chat.vercel.ai, while `"next": "15.5.7",` and `"eslint-config-next": "15.5.7",` are what the app actually installs, with `"react": "19.2.1",` beside them. The demo URL carried by the deploy button is gemini.vercel.ai, so three names for one deployment sit in the same page: chat.vercel.ai, gemini.vercel.ai and the heading Next.js Gemini Chatbot.

Smaller traces of the same drift sit in the metadata. The repository topics still list gemini-pro while the default model the README names is gemini-1.5-pro. `@vercel/analytics` sits in the dependencies, yet the feature list never mentions analytics. The development dependencies also include `@types/d3-scale` and `@types/pdf-parse`, type packages for charting and PDF text extraction that no described feature accounts for.

None of that blocks a fork. It does tell a reader that the prose and the dependency list were maintained separately, which is why the dependency list is the file to trust here.

## Pinned core, beta auth, and the cost of moving past them

Dependency style inside `package.json` is not uniform, and the exceptions mark where friction lives. Almost every runtime entry carries a caret, but `"ai": "3.4.9",` has none: the AI SDK core is pinned to one exact version while `@ai-sdk/google` next to it floats at `^0.0.51`. A provider package below 1.0 and an exact pin above it means the two halves of the streaming path are versioned by different rules, and any bump of one will not move the other. Close by sits `"next-auth": "5.0.0-beta.22",`, a beta major, and no upgrade instructions are given for it or for the exact pin.

What can be stated plainly: the last push was on 2026-05-27, the repository is not archived, and it carries no GitHub releases to diff against. Version numbers inside the files are therefore the only upgrade reference available, and the migration script reached through `db/migrate` is the only upgrade step spelled out anywhere. For a fork meant to live for months, that is where the time goes, not into the chat UI.

## Swapping providers means editing source, dropping persistence means editing the build

The alternative to forking this template is not another chat interface, it is keeping the AI SDK and declining the layers bundled here. The README says OpenAI, Anthropic and Cohere arrive with just a few lines of code, and that provider list is the only swapping mechanism on offer, since no provider config file appears at the top level. The same logic runs downward. Remove NextAuth and you lose `AUTH_SECRET`; remove the Drizzle layer and you must edit `"build": "tsx db/migrate && next build"`, because that migration has no documented switch to turn it off. `@vercel/blob` at `^0.24.1` is the third seam.

This is also where the generative half of the name goes quiet. The repository description promises generative UI, and the feature list credits the AI SDK with hooks for building dynamic chat and generative user interfaces, yet the documentation carries no tool call example and no client component to copy. A developer expecting a worked reference for a tool-calling agent will not find one described here. `zod` at `^3.23.8` and `streamdown` at `^1.6.7` are in the dependency list, so the parts are present; the walkthrough is not.

## Conclusion

This template illustrates a Gemini chat application with authentication and persistence. Before deploying, check the model configured in your checkout against Google's current availability and migrate deprecated model IDs and SDK integrations as needed. Review credentials, database migrations, dependencies and storage configuration in a test environment before production.

## FAQ

### What environment variables does vercel-labs/gemini-chatbot need to run locally?

Four keys are declared in .env.example: GOOGLE_GENERATIVE_AI_API_KEY, AUTH_SECRET, BLOB_READ_WRITE_TOKEN and POSTGRES_URL. The README says a .env file filled in by hand is enough, or you can run vercel link followed by vercel env pull to fetch them from a Vercel project.

### Which Gemini model does vercel-labs/gemini-chatbot use by default?

The inspected template names `gemini-1.5-pro` as its default. Google has retired Gemini 1.5 variants, so do not assume that model is still available; check the current Gemini deprecation page, update the model and SDK as needed, and test the resulting integration.

### Can vercel-labs/gemini-chatbot run on OpenAI or Anthropic instead of Gemini?

The README says you can switch to OpenAI, Anthropic, Cohere and other providers through the AI SDK with a few lines of code. Only @ai-sdk/google appears in the dependency list, so the other provider packages are added when you make that change.

### How does vercel-labs/gemini-chatbot store chat history and user data?

Through Vercel Postgres powered by Neon for chat history and user data, with Vercel Blob for object storage. The build script runs db/migrate before next build, and drizzle-orm with drizzle-kit and drizzle.config.ts handle the schema.

### Does vercel-labs/gemini-chatbot have to run on Vercel?

The documented path is a one-click Vercel deploy that attaches a postgres store and a blob store, plus a local flow built on the Vercel CLI with vercel link and vercel env pull. No instructions for hosting elsewhere are given, and BLOB_READ_WRITE_TOKEN and POSTGRES_URL are described as created automatically on Vercel.

## Sources

- [Issues](https://github.com/vercel-labs/gemini-chatbot/issues)
- [Project website](https://gemini.vercel.ai)
- [README](https://github.com/vercel-labs/gemini-chatbot/blob/main/README.md)
- [vercel-labs/gemini-chatbot on GitHub](https://github.com/vercel-labs/gemini-chatbot)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/vercel-labs-gemini-chatbot
