DC-4745 AI SDK Example Project#8276
Conversation
WalkthroughAdds a new Next.js AI SDK example at orm/ai-sdk-nextjs: Prisma schema, persistence and Prisma client, API routes for chat/messages, client chat UI, project configs, assets, and a CI Bash test runner that provisions a local Prisma Dev, runs migrations/seeds, starts the app, health-checks, and tears down. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant UI as Next.js Client (app/page.tsx)
participant APIc as POST /api/chat
participant AI as AI SDK
participant DB as Prisma (save-chat)
U->>UI: Submit message
UI->>APIc: POST { id, messages }
APIc->>AI: streamText(converted messages)
AI-->>APIc: Streamed tokens
APIc-->>UI: Streamed response
APIc->>DB: saveChat(messages, id)
DB-->>APIc: Persisted
sequenceDiagram
participant UI as Next.js Client (app/page.tsx)
participant APIg as GET /api/messages
participant DB as Prisma
UI->>APIg: GET /api/messages
APIg->>DB: findMany Messages (asc)
DB-->>APIg: Records
APIg-->>UI: { messages: [...] }
sequenceDiagram
participant SH as run.sh
participant P as Prisma Dev
participant N as Next.js Dev Server
participant H as curl
SH->>P: Start prisma dev (background)
SH->>P: Wait for prisma+postgres:// URL in log
SH->>SH: Export DATABASE_URL
SH->>P: Run prisma migrate/seed
SH->>N: Start npm run dev (background)
SH->>H: curl http://localhost:3000/
SH->>N: Terminate Next.js process
SH->>P: Terminate Prisma Dev process
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 33
🔭 Outside diff range comments (1)
.github/tests/orm/ai-sdk-nextjs/run.sh (1)
66-70: Missing line ending and improve cleanup messaging.Line 70 is missing a newline character at the end of the file. Also, the cleanup messages should be more consistent.
kill "$pid" -echo "🛑 App stopped (PID $pid)" +echo "🛑 Next.js app stopped (PID $pid)" kill "$NODE_PID" +echo "🛑 Prisma Dev stopped (PID $NODE_PID)" wait "$NODE_PID" || true +
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
orm/ai-sdk-nextjs/app/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (16)
.github/tests/orm/ai-sdk-nextjs/run.sh(1 hunks)orm/ai-sdk-nextjs/.env.example(1 hunks)orm/ai-sdk-nextjs/.gitignore(1 hunks)orm/ai-sdk-nextjs/README.md(1 hunks)orm/ai-sdk-nextjs/app/api/chat/route.ts(1 hunks)orm/ai-sdk-nextjs/app/api/messages/route.ts(1 hunks)orm/ai-sdk-nextjs/app/globals.css(1 hunks)orm/ai-sdk-nextjs/app/layout.tsx(1 hunks)orm/ai-sdk-nextjs/app/page.tsx(1 hunks)orm/ai-sdk-nextjs/lib/prisma.ts(1 hunks)orm/ai-sdk-nextjs/lib/save-chat.ts(1 hunks)orm/ai-sdk-nextjs/next.config.ts(1 hunks)orm/ai-sdk-nextjs/package.json(1 hunks)orm/ai-sdk-nextjs/postcss.config.mjs(1 hunks)orm/ai-sdk-nextjs/prisma/schema.prisma(1 hunks)orm/ai-sdk-nextjs/tsconfig.json(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
orm/ai-sdk-nextjs/app/api/chat/route.ts (1)
orm/ai-sdk-nextjs/lib/save-chat.ts (1)
saveChat(4-30)
🪛 dotenv-linter (3.3.0)
orm/ai-sdk-nextjs/.env.example
[warning] 2-2: [EndingBlankLine] No blank line at the end of the file
🪛 LanguageTool
orm/ai-sdk-nextjs/README.md
[grammar] ~1-~1: Use correct spacing
Context: # Vercel AI SDK V5 + Prisma example This example shows how to store AI chat ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~5-~5: Use correct spacing
Context: ...ma](https://www.prisma.io). ## Getting started ### 1. Download example and navigate into th...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: Use articles correctly
Context: ...). ## Getting started ### 1. Download example and navigate into the project directory...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~7-~7: There might be a mistake here.
Context: ...d example and navigate into the project directory Download this example: ``` npx try-pris...
(QB_NEW_EN_OTHER)
[grammar] ~9-~9: Use correct spacing
Context: ...to the project directory Download this example: npx try-prisma@latest --template orm/ai-sdk-nextjs Then, navigate into the project director...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~15-~15: Use correct spacing
Context: ...js Then, navigate into the project directory: cd ai-sdk-nextjs <details><summary><strong>Alternative:</strong> Clone the entire repo</summary> Clone this repository: git clone gi...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~23-~23: Use correct spacing
Context: ...e the entire repo Clone this repository: git clone git@github.com:prisma/prisma-examples.git --depth=1 Install npm dependencies: ``` cd prisma...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~29-~29: Use correct spacing
Context: ...examples.git --depth=1 Install npm dependencies: cd prisma-examples/orm/ai-sdk-nextjs npm install ```
.env.example file to `.env`...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~38-~38: Use correct spacing
Context: ...etails> Rename the .env.example file to .env ### 2. Create a Prisma Postgres instance Th...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~40-~40: There might be a mistake here.
Context: ....env ### 2. Create a Prisma Postgres instance This example uses a [Prisma Postgres](ht...
(QB_NEW_EN_OTHER)
[grammar] ~42-~42: Use the right verb tense
Context: ...rted with the project, you will need to setup a Prisma Postgres connection string: 1...
(QB_NEW_EN_OTHER_ERROR_IDS_13)
[grammar] ~42-~42: Use correct spacing
Context: ...d to setup a Prisma Postgres connection string: 1. Set up a new Prisma Postgres instance in...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~44-~44: Use correct spacing
Context: ...ma.io) and copy the database connection URL. > You can also start a new Prisma Postgres...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~46-~46: Use correct spacing
Context: ... also start a new Prisma Postgres using create-db. > > Run npx create-db@latest and copy the ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~48-~48: Use correct spacing
Context: ...BASE_URL that is "optimized for Prisma ORM". 2. Add your database url to the .env Tha...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~50-~50: Use correct spacing
Context: ...sma ORM"_. 2. Add your database url to the .env That's it, your project is now configure...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~52-~52: Use correct spacing
Context: ...project is now configured to use Prisma Postgres! ### 3. Generate and migrate Prisma client 1...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~54-~54: There might be a mistake here.
Context: ...es! ### 3. Generate and migrate Prisma client 1. Run the following command to generate th...
(QB_NEW_EN_OTHER)
[grammar] ~56-~56: Use correct spacing
Context: ...you will be using to interact with your database. npx prisma generate 2. Migrate the DB ``` npx prisma migrate d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~62-~62: There might be a mistake here.
Context: ...npx prisma generate 2. Migrate the DB npx prisma migrate dev --name init ``` ### 4. Set up Open AI 1. Navigate to https:...
(QB_NEW_EN_OTHER)
[grammar] ~68-~68: There might be a mistake here.
Context: ...rate dev --name init ``` ### 4. Set up Open AI 1. Navigate to https://platform.ope...
(QB_NEW_EN_OTHER)
[grammar] ~72-~72: There might be a mistake here.
Context: .... Create a new API key and give it full access 3. Add the API key to the .env. ### 5. S...
(QB_NEW_EN_OTHER)
[grammar] ~74-~74: Use correct spacing
Context: ... full access 3. Add the API key to the .env. ### 5. Start the development server ``` npm...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~76-~76: There might be a mistake here.
Context: ...e .env. ### 5. Start the development server npm run dev The server is now running at http://loca...
(QB_NEW_EN_OTHER)
[grammar] ~84-~84: There might be a mistake here.
Context: ...://localhost:3000 ## Switch to another database If you want to try this example with ano...
(QB_NEW_EN_OTHER)
[grammar] ~86-~86: Use correct spacing
Context: .../orm/overview/databases) section in our documentation. ## Next steps - Check out the [Prisma docs...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~88-~88: Use correct spacing
Context: ... section in our documentation. ## Next steps - Check out the [Prisma docs](https://www....
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~90-~90: Insert the missing word
Context: ... ## Next steps - Check out the Prisma docs - [Join ou...
(QB_NEW_EN_OTHER_ERROR_IDS_32)
🪛 markdownlint-cli2 (0.17.2)
orm/ai-sdk-nextjs/README.md
11-11: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
17-17: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
21-21: Inline HTML
Element: details
(MD033, no-inline-html)
21-21: Inline HTML
Element: summary
(MD033, no-inline-html)
21-21: Inline HTML
Element: strong
(MD033, no-inline-html)
25-25: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
31-31: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
50-50: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1
(MD029, ol-prefix)
58-58: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
62-62: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1
(MD029, ol-prefix)
64-64: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
70-70: Bare URL used
(MD034, no-bare-urls)
78-78: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
82-82: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/sveltekit)
- GitHub Check: test (orm/solid-start)
🔇 Additional comments (5)
orm/ai-sdk-nextjs/postcss.config.mjs (1)
1-5: Tailwind v4 setup verifiedBoth tailwindcss (^4) and @tailwindcss/postcss (^4) are present in orm/ai-sdk-nextjs/package.json, matching your postcss.config.mjs—no inconsistencies detected.
orm/ai-sdk-nextjs/package.json (2)
20-20: Zod v4 Stability Confirmed
Version “^4.0.15” is valid—Zod v4.x is officially stable (latest patch is v4.0.17). No changes required.
17-19: React 19.1.0 is compatible with Next.js 15.4.6 — please validate your ecosystemNext.js 15.x officially targets React 19, so your versions are aligned. Before shipping to production, verify that all dependencies in your monorepo support React 19 to avoid peer-dependency or runtime issues.
• File: orm/ai-sdk-nextjs/package.json (lines 17–19)
"next": "15.4.6", "react": "19.1.0", "react-dom": "19.1.0",• Audit critical libraries (UI frameworks, animation, 3D, forms) for React 19-compatible peerDependencies and upgrade them where necessary.
• Run full local builds (next build && next start) and mirror your CI/Vercel build to catch install-time or runtime errors.
• Avoid long-term use of--legacy-peer-depsor--force; prefer official upgrades, package resolutions/overrides, or alpha/beta releases.
• If a library isn’t yet React 19-ready, consult its repo for recommended workarounds (e.g., beta builds of @react-three/fiber).orm/ai-sdk-nextjs/lib/save-chat.ts (1)
13-13: Consider the implications of only saving the last two messages.The function only saves the last two messages, which might not capture the full conversation context. This could be intentional for storage optimization, but should be documented.
Is limiting message persistence to only the last two messages intentional? This approach will lose conversation history over time.
orm/ai-sdk-nextjs/app/api/chat/route.ts (1)
5-5: High maxDuration value needs justification.The
maxDurationof 3000 seems unusually high. Clarify if this is in seconds or milliseconds, and ensure it's appropriate for the use case.What are the units for Next.js
maxDuration? Is 3000 seconds (50 minutes) the intended timeout for this chat endpoint?
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (3)
orm/ai-sdk-nextjs/.env.example (1)
3-3: Trailing newline present — linter nit resolvedThe EndingBlankLine nit from earlier feedback is addressed. No further action needed.
orm/ai-sdk-nextjs/README.md (2)
62-62: Normalize ordered list numbering (MD029)Same issue later in the doc.
-2. Migrate the DB +1. Migrate the DB
50-50: Normalize ordered list numbering (MD029)Use 1/1/1 style for ordered lists to satisfy markdownlint and ease maintenance.
-2. Add your database URL to the `.env` +1. Add your database URL to the `.env`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
orm/ai-sdk-nextjs/.env.example(1 hunks)orm/ai-sdk-nextjs/.gitignore(1 hunks)orm/ai-sdk-nextjs/README.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
orm/ai-sdk-nextjs/README.md
[grammar] ~1-~1: Use correct spacing
Context: # Vercel AI SDK V5 + Prisma example This example shows how to store AI chat ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: Use articles correctly
Context: ...). ## Getting started ### 1. Download example and navigate into the project directory...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~7-~7: There might be a mistake here.
Context: ...d example and navigate into the project directory Download this example: ```bash npx try-...
(QB_NEW_EN_OTHER)
[grammar] ~9-~9: Use correct spacing
Context: ...to the project directory Download this example: bash npx try-prisma@latest --template orm/ai-sdk-nextjs Then, navigate into the project director...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~15-~15: Use correct spacing
Context: ...js Then, navigate into the project directory: bash cd ai-sdk-nextjs <details><summary><strong>Alternative:</strong> Clone the entire repo</summary> Clone this repository: bash git clon...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~23-~23: Use correct spacing
Context: ...e the entire repo Clone this repository: bash git clone git@github.com:prisma/prisma-examples.git --depth=1 Install npm dependencies: ```bash cd pr...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~29-~29: Use correct spacing
Context: ...examples.git --depth=1 Install npm dependencies: bash cd prisma-examples/orm/ai-sdk-nextjs npm install ```
.env.example file to `.env`...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~38-~38: Use correct spacing
Context: ...etails> Rename the .env.example file to .env ### 2. Create a Prisma Postgres instance Th...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~40-~40: There might be a mistake here.
Context: ....env ### 2. Create a Prisma Postgres instance This example uses a [Prisma Postgres](ht...
(QB_NEW_EN_OTHER)
[grammar] ~42-~42: Use the right verb tense
Context: ...rted with the project, you will need to setup a Prisma Postgres connection string: 1...
(QB_NEW_EN_OTHER_ERROR_IDS_13)
[grammar] ~42-~42: Use correct spacing
Context: ...d to setup a Prisma Postgres connection string: 1. Set up a new Prisma Postgres instance in...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~44-~44: Use correct spacing
Context: ...ma.io) and copy the database connection URL. > You can also start a new Prisma Postgres...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~48-~48: Use correct spacing
Context: ...BASE_URL that is "optimized for Prisma ORM". 2. Add your database URL to the .env Tha...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~50-~50: Use correct spacing
Context: ...sma ORM"_. 2. Add your database URL to the .env That's it, your project is now configure...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~52-~52: Use correct spacing
Context: ...project is now configured to use Prisma Postgres! ### 3. Generate and migrate Prisma client 1...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~54-~54: There might be a mistake here.
Context: ...es! ### 3. Generate and migrate Prisma client 1. Run the following command to generate th...
(QB_NEW_EN_OTHER)
[grammar] ~56-~56: Use correct spacing
Context: ...you will be using to interact with your database. bash npx prisma generate 2. Migrate the DB ```bash npx prisma migra...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~62-~62: There might be a mistake here.
Context: ...npx prisma generate 2. Migrate the DB bash npx prisma migrate dev --name init ``` ### 4. Set up OpenAI 1. Navigate to [OpenAI...
(QB_NEW_EN_OTHER)
[grammar] ~68-~68: There might be a mistake here.
Context: ...rate dev --name init ``` ### 4. Set up OpenAI 1. Navigate to [OpenAI API keys](https://pl...
(QB_NEW_EN_OTHER)
[grammar] ~70-~70: There might be a mistake here.
Context: ...t up OpenAI 1. Navigate to OpenAI API keys 2. Create a new API key and give it full ac...
(QB_NEW_EN_OTHER)
[grammar] ~72-~72: There might be a mistake here.
Context: .... Create a new API key and give it full access 3. Add the API key to the .env. ### 5. S...
(QB_NEW_EN_OTHER)
[grammar] ~74-~74: Use correct spacing
Context: ... full access 3. Add the API key to the .env. ### 5. Start the development server ```bash...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~76-~76: There might be a mistake here.
Context: ...e .env. ### 5. Start the development server bash npm run dev The server is now running at [http://loc...
(QB_NEW_EN_OTHER)
[grammar] ~84-~84: There might be a mistake here.
Context: ...//localhost:3000) ## Switch to another database If you want to try this example with ano...
(QB_NEW_EN_OTHER)
[grammar] ~86-~86: Use correct spacing
Context: .../orm/overview/databases) section in our documentation. ## Next steps - Check out the [Prisma docs...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~88-~88: Use correct spacing
Context: ... section in our documentation. ## Next steps - Check out the [Prisma docs](https://www....
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~90-~90: Insert the missing word
Context: ... ## Next steps - Check out the Prisma docs - [Join ou...
(QB_NEW_EN_OTHER_ERROR_IDS_32)
🪛 markdownlint-cli2 (0.17.2)
orm/ai-sdk-nextjs/README.md
21-21: Inline HTML
Element: details
(MD033, no-inline-html)
21-21: Inline HTML
Element: summary
(MD033, no-inline-html)
21-21: Inline HTML
Element: strong
(MD033, no-inline-html)
50-50: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1
(MD029, ol-prefix)
62-62: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1
(MD029, ol-prefix)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (26)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/graphql-auth)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/graphql-subscriptions)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/solid-start)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/sveltekit)
🔇 Additional comments (2)
orm/ai-sdk-nextjs/.gitignore (2)
33-39: Env patterns and template negation look correctCovers .env variants and preserves .env.example. This matches project needs and common practices.
47-47: Prisma client output ignored correctlyIgnoring /app/generated/prisma aligns with the generator output path and avoids committing generated artifacts.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (3)
orm/ai-sdk-nextjs/README.md (3)
21-36: Wrap inline HTML block with markdownlint disable/enable for MD033If MD033 is enforced, surround the
Details
block with disable/enable comments to avoid lint errors while keeping the collapsible UI.Apply this diff:
-<details><summary><strong>Alternative:</strong> Clone the entire repo</summary> +<!-- markdownlint-disable MD033 --> +<details><summary><strong>Alternative:</strong> Clone the entire repo</summary> @@ -</details> +</details> +<!-- markdownlint-enable MD033 -->
50-50: Normalize ordered list numbering to 1/1/1 (MD029)Align with MD029 by using “1.” for all ordered items.
-2. Add your database URL to the `.env` +1. Add your database URL to the `.env`
62-66: Normalize numbering and expand “DB” to “database” for clarityMatch MD029’s 1/1/1 style and prefer “database” over “DB” in docs.
-2. Migrate the DB +1. Migrate the database
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
orm/ai-sdk-nextjs/README.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
orm/ai-sdk-nextjs/README.md
[grammar] ~1-~1: Use correct spacing
Context: # Vercel AI SDK V5 + Prisma example This example shows how to store AI chat ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~5-~5: Use correct spacing
Context: ...ma](https://www.prisma.io). ## Getting started ### 1. Download example and navigate into th...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~7-~7: Use articles correctly
Context: ...). ## Getting started ### 1. Download example and navigate into the project directory...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~7-~7: There might be a mistake here.
Context: ...d example and navigate into the project directory Download this example: ```bash npx try-...
(QB_NEW_EN_OTHER)
[grammar] ~9-~9: Use correct spacing
Context: ...to the project directory Download this example: bash npx try-prisma@latest --template orm/ai-sdk-nextjs Then, navigate into the project director...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~15-~15: Use correct spacing
Context: ...js Then, navigate into the project directory: bash cd ai-sdk-nextjs <details><summary><strong>Alternative:</strong> Clone the entire repo</summary> Clone this repository: bash git clon...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~23-~23: Use correct spacing
Context: ...e the entire repo Clone this repository: bash git clone git@github.com:prisma/prisma-examples.git --depth=1 Install npm dependencies: ```bash cd pr...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~29-~29: Use correct spacing
Context: ...examples.git --depth=1 Install npm dependencies: bash cd prisma-examples/orm/ai-sdk-nextjs npm install ```
.env.example file to `.env`...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~38-~38: Use correct spacing
Context: ...etails> Rename the .env.example file to .env ### 2. Create a Prisma Postgres instance Th...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~40-~40: There might be a mistake here.
Context: ....env ### 2. Create a Prisma Postgres instance This example uses a [Prisma Postgres](ht...
(QB_NEW_EN_OTHER)
[grammar] ~42-~42: Use correct spacing
Context: ... to set up a Prisma Postgres connection string: 1. Set up a new Prisma Postgres instance in...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~44-~44: Use correct spacing
Context: ...ma.io) and copy the database connection URL. > You can also start a new Prisma Postgres...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~48-~48: Use correct spacing
Context: ...BASE_URL that is "optimized for Prisma ORM". 2. Add your database URL to the .env Tha...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~50-~50: Use correct spacing
Context: ...sma ORM"_. 2. Add your database URL to the .env That's it, your project is now configure...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~52-~52: Use correct spacing
Context: ...project is now configured to use Prisma Postgres! ### 3. Generate and migrate Prisma client 1...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~54-~54: There might be a mistake here.
Context: ...es! ### 3. Generate and migrate Prisma client 1. Run the following command to generate th...
(QB_NEW_EN_OTHER)
[grammar] ~56-~56: Use correct spacing
Context: ...you will be using to interact with your database. bash npx prisma generate 2. Migrate the DB ```bash npx prisma migra...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~62-~62: There might be a mistake here.
Context: ...npx prisma generate 2. Migrate the DB bash npx prisma migrate dev --name init ``` ### 4. Set up OpenAI 1. Navigate to [OpenAI...
(QB_NEW_EN_OTHER)
[grammar] ~68-~68: There might be a mistake here.
Context: ...rate dev --name init ``` ### 4. Set up OpenAI 1. Navigate to [OpenAI API keys](https://pl...
(QB_NEW_EN_OTHER)
[grammar] ~70-~70: There might be a mistake here.
Context: ...t up OpenAI 1. Navigate to OpenAI API keys 2. Create a new API key and give it full ac...
(QB_NEW_EN_OTHER)
[grammar] ~72-~72: There might be a mistake here.
Context: .... Create a new API key and give it full access 3. Add the API key to the .env. ### 5. S...
(QB_NEW_EN_OTHER)
[grammar] ~74-~74: Use correct spacing
Context: ... full access 3. Add the API key to the .env. ### 5. Start the development server ```bash...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~76-~76: There might be a mistake here.
Context: ...e .env. ### 5. Start the development server bash npm run dev The server is now running at [http://loc...
(QB_NEW_EN_OTHER)
[grammar] ~84-~84: There might be a mistake here.
Context: ...//localhost:3000) ## Switch to another database If you want to try this example with ano...
(QB_NEW_EN_OTHER)
[grammar] ~86-~86: Use correct spacing
Context: .../orm/overview/databases) section in our documentation. ## Next steps - Check out the [Prisma docs...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~88-~88: Use correct spacing
Context: ... section in our documentation. ## Next steps - Check out the [Prisma docs](https://www....
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~90-~90: Insert the missing word
Context: ... ## Next steps - Check out the Prisma docs - [Join ou...
(QB_NEW_EN_OTHER_ERROR_IDS_32)
🪛 markdownlint-cli2 (0.17.2)
orm/ai-sdk-nextjs/README.md
21-21: Inline HTML
Element: details
(MD033, no-inline-html)
21-21: Inline HTML
Element: summary
(MD033, no-inline-html)
21-21: Inline HTML
Element: strong
(MD033, no-inline-html)
50-50: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1
(MD029, ol-prefix)
62-62: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1
(MD029, ol-prefix)
🔇 Additional comments (2)
orm/ai-sdk-nextjs/README.md (2)
1-19: Solid README and prior nitpicks addressedGood job fixing prior feedback: vendor spelling, fenced code languages, URL protocol, OpenAI link, and localhost formatting are all corrected. Content is clear and actionable.
17-19: Confirm whether dependencies are auto-installed with try-prismaDoes npx try-prisma auto-install dependencies for this template? If not, add an “Install dependencies” step here for parity with the clone path.
Proposed addition if needed:
Then, navigate into the project directory: ```bash cd ai-sdk-nextjs
+Install npm dependencies:
+
+bash +npm install +</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Summary by CodeRabbit
New Features
API
Documentation
Chores
Tests