Skip to content

Conversation

saminacodes
Copy link
Member

@saminacodes saminacodes commented Sep 1, 2025


PR-Codex overview

This PR focuses on providing a migration guide for users transitioning from the deprecated Nebula API to the new thirdweb AI API, detailing endpoint changes, request structure comparisons, and migration steps.

Detailed summary

  • Added a new section in sidebar.tsx for "Migrate from Nebula".
  • Created a migration guide in page.mdx with:
    • Endpoint changes and benefits of the new API.
    • Request structure comparison before and after migration.
    • Detailed migration steps for updating endpoint, message format, and context structure.
    • Example migration function for users.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Documentation
    • Added a “Migrate from Nebula” guide showing how to switch from Nebula to the thirdweb AI Chat API — covers endpoint updates, field mappings, payload structure, session handling, example requests, a Quick Reference mapping, step-by-step migration steps, and a migration checklist with an example transformation.
  • Chores
    • Added a “Migrate from Nebula” link to the AI sidebar under the Blockchain LLM section for quick access.

@saminacodes saminacodes requested review from a team as code owners September 1, 2025 20:58
Copy link

changeset-bot bot commented Sep 1, 2025

⚠️ No Changeset found

Latest commit: c42db48

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Sep 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Sep 4, 2025 11:42pm
nebula Ready Ready Preview Comment Sep 4, 2025 11:42pm
thirdweb_playground Ready Ready Preview Comment Sep 4, 2025 11:42pm
thirdweb-www Ready Ready Preview Comment Sep 4, 2025 11:42pm
wallet-ui Ready Ready Preview Comment Sep 4, 2025 11:42pm

Copy link
Contributor

coderabbitai bot commented Sep 1, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a new MDX documentation page describing how to migrate from Nebula/nebula-api.chat to the thirdweb AI Chat API and updates the AI sidebar to include a “Migrate from Nebula” link. Documentation and navigation only; no runtime or API code changed.

Changes

Cohort / File(s) Change Summary
Documentation: Nebula → thirdweb AI migration guide
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx
New MDX page detailing endpoint change, field mappings (e.g., messagemessages[].content, session_idcontext.session_id, context string → context object, walletAddresscontext.from, chainIdscontext.chain_ids), before/after payload examples, migration steps, an example migrateToNewAPI(oldRequest) transform, session handling/future-proofing notes, and a quick-reference mapping.
Navigation: AI sidebar link
apps/portal/src/app/ai/sidebar.tsx
Adds a “Migrate from Nebula” link under the Blockchain LLM section pointing to /ai/chat/migrate-from-nebula; only the sidebar data updated, export/signatures unchanged.

Sequence Diagram(s)

None — documentation and sidebar data changes only; no runtime control-flow modifications to illustrate.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ai-migration-guide

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

graphite-app bot commented Sep 1, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Sep 1, 2025
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.54%. Comparing base (bb89561) to head (c42db48).
⚠️ Report is 45 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7961   +/-   ##
=======================================
  Coverage   56.54%   56.54%           
=======================================
  Files         904      904           
  Lines       58677    58677           
  Branches     4150     4150           
=======================================
  Hits        33181    33181           
  Misses      25389    25389           
  Partials      107      107           
Flag Coverage Δ
packages 56.54% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Sep 1, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.01 KB (0%) 1.3 s (0%) 364 ms (+36.64% 🔺) 1.7 s
thirdweb (cjs) 357.32 KB (0%) 7.2 s (0%) 1.9 s (-0.26% 🔽) 9 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 120 ms (+658.2% 🔺) 234 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 65 ms (+1229.63% 🔺) 75 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (0%) 383 ms (0%) 119 ms (+272.28% 🔺) 502 ms

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (6)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (6)

5-6: Fix intro grammar and branding

Tighten wording and name the target API explicitly.

-If you previously used the Nebula endpoints (nebula-api.thirdweb.com/chat) for thirdweb AI features, this guide that will teach you how
-to migrate to the thirdweb API.
+If you previously used the Nebula endpoint (https://nebula-api.thirdweb.com/chat) for thirdweb AI features, this guide will teach you how to migrate to the thirdweb AI Chat API.

8-8: Deprecation callout punctuation + spelling; confirm the date is correct

Add comma after the date, remove hyphen in “rebranded,” and end with a period. Please verify August 14, 2025 is the intended public deprecation date.

-<Callout variant="info" title="Nebula Deprecation"> As of August 14, 2025 Nebula (blockchain LLM) has officially been deprecated and re-branded to thirdweb AI </Callout>
+<Callout variant="info" title="Nebula Deprecation"> As of August 14, 2025, Nebula (blockchain LLM) has officially been deprecated and rebranded to thirdweb AI.</Callout>

15-21: Section header clarity; minor grammar

Name the API precisely and fix subject-verb agreement.

-## Benefits of thirdweb API
+## Benefits of the thirdweb AI Chat API
@@
-- Better Message History: Support for multi-turn conversations with role-based messages
+- Better Message History: Supports multi-turn conversations with role-based messages

107-111: Message example formatting

Split properties onto separate lines; add trailing comma for consistency.

-  {
-    role: "user",    content: "Your message here"  }
-]
+  {
+    role: "user",
+    content: "Your message here",
+  }
+]

150-154: Typos: “Manangement” and “Sssions”

Correct spelling in step title and bullet.

-<Step title="Session Manangement">
+<Step title="Session Management">
@@
-- Sssions enable conversation continuity
+- Sessions enable conversation continuity

160-176: Example migration function formatting + types

Un-jam the comment, add basic TS annotations, and use nullish coalescing for stream.

-function migrateToNewAPI(oldRequest) {
-  // Parse old context string  const contextString = oldRequest.context;  const contextData = parseContextString(contextString); // Implement this helper
-  return {
+function migrateToNewAPI(oldRequest: {
+  message: string;
+  stream?: boolean;
+  session_id?: string;
+  context: string;
+}) {
+  // Parse old context string
+  const contextString = oldRequest.context;
+  const contextData = parseContextString(contextString); // implement this helper
+  return {
     context: {
       chain_ids: contextData.chainIds,
       from: contextData.walletAddress,
       session_id: oldRequest.session_id,
     },
     messages: [
       {
         role: "user",
         content: oldRequest.message,
       },
     ],
-    stream: oldRequest.stream || false,
+    stream: oldRequest.stream ?? false,
   };
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7eed8e6 and 76be3f8.

📒 Files selected for processing (2)
  • apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1 hunks)
  • apps/portal/src/app/ai/sidebar.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • apps/portal/src/app/ai/sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • apps/portal/src/app/ai/sidebar.tsx
🪛 LanguageTool
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx

[grammar] ~5-~5: There might be a mistake here.
Context: ...ures, this guide that will teach you how to migrate to the thirdweb API. <Callou...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...rdweb AI Endpoint Changes: - Old URL: `https://nebula-api.thirdweb.co...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...lout> Endpoint Changes: - Old URL: https://nebula-api.thirdweb.com/chat - New URL: `https://api.thirdweb.com/ai/ch...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ... | |-----------------|---------------------...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...---------------------------------------| | message | messages[].content ...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...e string → Array of message objects | | session_id | context.session_id ...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ... inside context object (optional) | | context (string)| context (object) ...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ...g format → Structured object | | walletAddress | context.from ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ed field | | chainIds | context.chain_ids ...

(QB_NEW_EN)


[grammar] ~113-~113: There might be a mistake here.
Context: ...message here" } ] ``` Supported roles: - user - Messages from the user - **assi...

(QB_NEW_EN)


[grammar] ~114-~114: There might be a mistake here.
Context: ...les: - user - Messages from the user - assistant - Messages from the AI - **s...

(QB_NEW_EN)


[grammar] ~115-~115: There might be a mistake here.
Context: ...r - assistant - Messages from the AI - system - System messages for context ...

(QB_NEW_EN)


[grammar] ~142-~142: There might be a mistake here.
Context: ...uired | Notes | |---------------|--------------------|--...

(QB_NEW_EN)


[grammar] ~143-~143: There might be a mistake here.
Context: ...------|--------------------------------| | walletAddress | context.from | O...

(QB_NEW_EN)


[grammar] ~144-~144: There might be a mistake here.
Context: ...al | Wallet that executes transactions | | chainIds | context.chain_ids | O...

(QB_NEW_EN)


[grammar] ~145-~145: There might be a mistake here.
Context: ...ional | Array of chain IDs | | session_id | context.session_id | O...

(QB_NEW_EN)

⏰ 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). (6)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/portal/src/app/ai/sidebar.tsx (1)

36-39: Nebula migration link — LGTM

Path matches the new page route; consistent with surrounding items. Please confirm the docs page is included in the build so this link resolves.

apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1)

40-44: Verify auth header name

Confirm whether the correct header is x-secret-key, x-thirdweb-api-key, or Authorization: Bearer <key> to avoid misleading users.

Also applies to: 58-61

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 1, 2025 21:25 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula September 1, 2025 21:25 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www September 1, 2025 21:25 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 1, 2025 21:25 Inactive
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula September 1, 2025 21:26 Inactive
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 1, 2025 21:26 Inactive
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 1, 2025 21:26 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www September 1, 2025 21:26 Inactive

```typescript
function migrateToNewAPI(oldRequest) {
// Parse old context string const contextString = oldRequest.context; const contextData = parseContextString(contextString); // Implement this helper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code formatting in this line appears to have lost its line breaks, resulting in multiple statements running together. This will cause a JavaScript syntax error when executed. The code should be properly formatted with each statement on its own line:

// Parse old context string
const contextString = oldRequest.context;
const contextData = parseContextString(contextString); // Implement this helper

This maintains the intended functionality while ensuring the code will parse correctly.

Suggested change
// Parse old context string const contextString = oldRequest.context; const contextData = parseContextString(contextString); // Implement this helper
// Parse old context string
const contextString = oldRequest.context;
const contextData = parseContextString(contextString); // Implement this helper

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1)

160-161: Fix broken line formatting in example function.
Multiple statements run together -> syntax error. Break into separate lines. (This was flagged earlier as well.)

-function migrateToNewAPI(oldRequest) {
-  // Parse old context string  const contextString = oldRequest.context;  const contextData = parseContextString(contextString); // Implement this helper
+function migrateToNewAPI(oldRequest: any) {
+  // Parse old context string
+  const contextString = oldRequest.context;
+  const contextData = parseContextString(contextString); // Implement this helper
🧹 Nitpick comments (6)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (6)

5-6: Fix grammar and naming for clarity.
Tighten the intro and standardize product name.

-If you previously used the Nebula endpoints (nebula-api.thirdweb.com/chat) for thirdweb AI features, this guide that will teach you how
-to migrate to the thirdweb API.
+If you previously used the Nebula endpoint (https://nebula-api.thirdweb.com/chat) for thirdweb AI features, this guide will teach you how to migrate to the thirdweb AI Chat API.

8-8: Polish deprecation callout; confirm date.
Add comma, fix “re-branded” → “rebranded,” end with a period. Please confirm August 14, 2025 is the correct deprecation date across docs.

-<Callout variant="info" title="Nebula Deprecation"> As of August 14, 2025 Nebula (blockchain LLM) has officially been deprecated and re-branded to thirdweb AI </Callout>
+<Callout variant="info" title="Nebula Deprecation"> As of August 14, 2025, Nebula (blockchain LLM) has been deprecated and rebranded as thirdweb AI. </Callout>

15-15: Align section title with product name.

-## Benefits of thirdweb API
+## Benefits of the thirdweb AI API

25-26: Clarify table headers (“Nebula” vs “thirdweb AI”).

-| First API Field | Second API Field        | Notes                                       |
+| Nebula API Field | thirdweb AI Field      | Notes                                       |

87-91: Remove angle brackets from inline URLs.
Angle brackets inside code ticks reduce copy-paste usability.

-`<https://nebula-api.thirdweb.com/chat>`
+`https://nebula-api.thirdweb.com/chat`

-`<https://api.thirdweb.com/ai/chat>`
+`https://api.thirdweb.com/ai/chat`

48-48: Use commas in the stringified context example to avoid confusion.
Semicolons inside a pseudo-object string can confuse readers.

-    context: "{ chainIds: [1]; walletAddress: '0x123...'; }",
+    context: "{ chainIds: [1], walletAddress: '0x123...' }",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 76be3f8 and 38f50d0.

📒 Files selected for processing (1)
  • apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx

[grammar] ~5-~5: There might be a mistake here.
Context: ...ures, this guide that will teach you how to migrate to the thirdweb API. <Callou...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...rdweb AI Endpoint Changes: - Old URL: `https://nebula-api.thirdweb.co...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...lout> Endpoint Changes: - Old URL: https://nebula-api.thirdweb.com/chat - New URL: `https://api.thirdweb.com/ai/ch...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ...stry-standard conversational AI patterns - Better Message History: Support for mult...

(QB_NEW_EN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...n conversations with role-based messages - Structured Context: Type-safe object for...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ... object format instead of string parsing - Enhanced Session Management: More flexib...

(QB_NEW_EN)


[grammar] ~20-~20: There might be a mistake here.
Context: ...nagement: More flexible session handling - Future-Proof: Aligned with modern chat A...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ... | |-----------------|---------------------...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...---------------------------------------| | message | messages[].content ...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...e string → Array of message objects | | session_id | context.session_id ...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ... inside context object (optional) | | context (string)| context (object) ...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ...g format → Structured object | | walletAddress | context.from ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ed field | | chainIds | context.chain_ids ...

(QB_NEW_EN)


[grammar] ~113-~113: There might be a mistake here.
Context: ...message here" } ] ``` Supported roles: - user - Messages from the user - **assi...

(QB_NEW_EN)


[grammar] ~114-~114: There might be a mistake here.
Context: ...les: - user - Messages from the user - assistant - Messages from the AI - **s...

(QB_NEW_EN)


[grammar] ~115-~115: There might be a mistake here.
Context: ...r - assistant - Messages from the AI - system - System messages for context ...

(QB_NEW_EN)


[grammar] ~142-~142: There might be a mistake here.
Context: ...uired | Notes | |---------------|--------------------|--...

(QB_NEW_EN)


[grammar] ~143-~143: There might be a mistake here.
Context: ...------|--------------------------------| | walletAddress | context.from | O...

(QB_NEW_EN)


[grammar] ~144-~144: There might be a mistake here.
Context: ...al | Wallet that executes transactions | | chainIds | context.chain_ids | O...

(QB_NEW_EN)


[grammar] ~145-~145: There might be a mistake here.
Context: ...ional | Array of chain IDs | | session_id | context.session_id | O...

(QB_NEW_EN)

⏰ 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). (1)
  • GitHub Check: Size
🔇 Additional comments (1)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1)

41-43: Confirm header name.
Is the auth header “x-secret-key” (not “x-api-key”) across the AI Chat API? Align with the canonical reference.

Also applies to: 59-61

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – nebula September 2, 2025 05:15 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 2, 2025 05:15 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www September 2, 2025 05:15 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 2, 2025 05:15 Inactive

Change your base URL from:

`<https://nebula-api.thirdweb.com/chat>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL formatting contains a mix of backticks and angle brackets which creates inconsistent markdown. Please use either backticks alone:

`https://nebula-api.thirdweb.com/chat`

Or angle brackets alone:

<https://nebula-api.thirdweb.com/chat>

This will ensure proper rendering in the documentation.

Suggested change
`<https://nebula-api.thirdweb.com/chat>`
<https://nebula-api.thirdweb.com/chat>

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

});
```

## After (thirdweb AI Chat API)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading format is inconsistent between the "Before" and "After" sections. For document structure consistency, consider changing this heading to use the same heading level as the "Before" section:

### After (thirdweb AI Chat API)

This maintains proper document hierarchy and improves readability of the migration guide.

Suggested change
## After (thirdweb AI Chat API)
### After (thirdweb AI Chat API)

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1)

160-166: Fix broken code sample (lost line breaks); this won’t compile as-is

Restore line breaks so readers can paste/run the example. This was flagged earlier; still present.

-function migrateToNewAPI(oldRequest) {
-  // Parse old context string  const contextString = oldRequest.context;  const contextData = parseContextString(contextString); // Implement this helper
+function migrateToNewAPI(oldRequest) {
+  // Parse old context string
+  const contextString = oldRequest.context;
+  const contextData = parseContextString(contextString); // Implement this helper

Optional: add a brief note that if the old context is valid JSON, teams can replace parseContextString with JSON.parse.

🧹 Nitpick comments (6)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (6)

5-6: Tighten intro wording and product name

Streamline grammar and align naming with the product.

-If you previously used the Nebula endpoints (nebula-api.thirdweb.com/chat) for thirdweb AI features, this guide that will teach you how
-to migrate to the thirdweb API.
+If you previously used the Nebula endpoint (nebula-api.thirdweb.com/chat) for thirdweb AI features, this guide will help you
+ migrate to the thirdweb AI Chat API.

8-8: Deprecation callout: grammar, punctuation, and branding; confirm the date

Small copy fixes; also please verify the exact deprecation date/wording.

-<Callout variant="info" title="Nebula Deprecation"> As of August 14, 2025 Nebula (blockchain LLM) has officially been deprecated and re-branded to thirdweb AI </Callout>
+<Callout variant="info" title="Nebula deprecation">As of August 14, 2025, Nebula (blockchain LLM) has been deprecated and rebranded as thirdweb AI.</Callout>

Would you confirm that “August 14, 2025” is the correct public deprecation date and that “thirdweb AI” (vs. “thirdweb AI Chat API”) is the intended brand here?


15-15: Heading consistency: use the product name “thirdweb AI Chat API”

Aligns with the rest of the doc and PR title.

-## Benefits of thirdweb API
+## Benefits of the thirdweb AI Chat API

25-31: Clarify table headers (“Nebula” vs “thirdweb AI”)

Makes the mapping immediately unambiguous.

-| First API Field | Second API Field        | Notes                                       |
+| Nebula API Field | thirdweb AI Field       | Notes                                       |

87-93: Remove angle brackets around URLs in steps

Angle brackets inside inline code can confuse copy/paste.

-`<https://nebula-api.thirdweb.com/chat>`
+`https://nebula-api.thirdweb.com/chat`

-`<https://api.thirdweb.com/ai/chat>`
+`https://api.thirdweb.com/ai/chat`

41-43: x-secret-key header is correct; remind to store secret server-side
Official thirdweb AI Chat API uses the x-secret-key header for project authentication—no change needed here. Add a one-line note above both snippets (lines 41–43 and 59–61) to remind that the secret must be loaded from a server-side environment variable (not exposed in the browser).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 38f50d0 and f8e468d.

📒 Files selected for processing (1)
  • apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx

[grammar] ~5-~5: There might be a mistake here.
Context: ...ures, this guide that will teach you how to migrate to the thirdweb API. <Callou...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...rdweb AI Endpoint Changes: - Old URL: `https://nebula-api.thirdweb.co...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...lout> Endpoint Changes: - Old URL: https://nebula-api.thirdweb.com/chat - New URL: `https://api.thirdweb.com/ai/ch...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ... | |-----------------|---------------------...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...---------------------------------------| | message | messages[].content ...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...e string → Array of message objects | | session_id | context.session_id ...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ... inside context object (optional) | | context (string)| context (object) ...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ...g format → Structured object | | walletAddress | context.from ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ed field | | chainIds | context.chain_ids ...

(QB_NEW_EN)


[grammar] ~143-~143: There might be a mistake here.
Context: ...uired | Notes | |---------------|--------------------|--...

(QB_NEW_EN)


[grammar] ~144-~144: There might be a mistake here.
Context: ...------|--------------------------------| | walletAddress | context.from | O...

(QB_NEW_EN)


[grammar] ~145-~145: There might be a mistake here.
Context: ...al | Wallet that executes transactions | | chainIds | context.chain_ids | O...

(QB_NEW_EN)


[grammar] ~146-~146: There might be a mistake here.
Context: ...ional | Array of chain IDs | | session_id | context.session_id | O...

(QB_NEW_EN)

⏰ 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). (8)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/portal/src/app/ai/chat/migrate-from-nebula/page.mdx (1)

3-22: Overall: solid, actionable migration guide

Clear side-by-side examples, field mapping, and steps. Nice work.

Comment on lines +114 to +117
Supported roles:
- **user** - Messages from the user
- **assistant** - Messages from the AI
- **system** - System messages for context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block formatting has an issue where the "Supported roles" section is incorrectly placed inside the code block. This creates a formatting problem in the rendered documentation.

The code block should be closed before the roles list begins, like this:

messages: [
  {
    role: "user",
    content: "Your message here",
  }
]

Then the supported roles should be listed as regular markdown text:

Supported roles:
- **user** - Messages from the user
- **assistant** - Messages from the AI
- **system** - System messages for context

This will ensure proper rendering of both the code example and the roles explanation.

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

role: "user",
content: "Your message here",
}
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing closing quotes here, which breaks the component

Copy link
Contributor

This PR has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Sep 13, 2025
@github-actions github-actions bot closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Portal Involves changes to the Portal (docs) codebase. Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants