Skip to content

[Dashboard] Point AI requests at the gateway - #8922

Merged
0xFirekeeper merged 2 commits into
mainfrom
ai/point-dashboard-at-ai-service
Aug 28, 2026
Merged

[Dashboard] Point AI requests at the gateway#8922
0xFirekeeper merged 2 commits into
mainfrom
ai/point-dashboard-at-ai-service

Conversation

@0xFirekeeper

@0xFirekeeper 0xFirekeeper commented Aug 28, 2026

Copy link
Copy Markdown
Member

Routes the project AI features at their current host and matches the expected request shape.


PR-Codex overview

This PR focuses on updating the API interactions and constants related to the thirdweb service, enhancing the way team IDs are handled in requests, and refining the context structure for chat API calls.

Detailed summary

  • Changed header key from x-team-id to x-thirdweb-team-id in fetchWithAuthToken.ts.
  • Updated the default value of NEXT_PUBLIC_THIRDWEB_AI_HOST in public-envs.ts to a new API endpoint.
  • Refined the keysCaptured assignment in rotate-admin-key.client.tsx.
  • Enhanced the context structure in the chat API body in chat.ts.

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

Summary by CodeRabbit

  • Bug Fixes

    • Updated AI service connectivity to use the current API endpoint.
    • Improved AI chat request handling, including session context and wallet information.
    • Updated team authentication headers for reliable project requests.
  • Style

    • Simplified internal key-capture formatting without changing behavior.

@0xFirekeeper
0xFirekeeper requested review from a team as code owners August 28, 2026 23:20
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
thirdweb-www Ready Ready Preview Aug 28, 2026 11:40pm
4 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs-v2 Skipped Skipped Aug 28, 2026 11:40pm
nebula Skipped Skipped Aug 28, 2026 11:40pm
thirdweb_playground Skipped Skipped Aug 28, 2026 11:40pm
wallet-ui Skipped Skipped Aug 28, 2026 11:40pm

@vercel
vercel Bot temporarily deployed to Preview – thirdweb_playground August 28, 2026 23:20 Inactive
@vercel
vercel Bot temporarily deployed to Preview – docs-v2 August 28, 2026 23:20 Inactive
@vercel
vercel Bot temporarily deployed to Preview – nebula August 28, 2026 23:20 Inactive
@vercel
vercel Bot temporarily deployed to Preview – wallet-ui August 28, 2026 23:20 Inactive
@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f4f1a49

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

@github-actions github-actions Bot added the Dashboard Involves changes to the Dashboard. label Aug 28, 2026
Routes the project AI features at their current host and matches the expected
request shape.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@0xFirekeeper
0xFirekeeper force-pushed the ai/point-dashboard-at-ai-service branch from 396d7c1 to 4cf9a0b Compare August 28, 2026 23:25
@vercel
vercel Bot temporarily deployed to Preview – docs-v2 August 28, 2026 23:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – wallet-ui August 28, 2026 23:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – nebula August 28, 2026 23:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – thirdweb_playground August 28, 2026 23:25 Inactive
@thirdweb-dev thirdweb-dev deleted a comment from coderabbitai Bot Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 KB (0%)

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.14%. Comparing base (4f53d4a) to head (f4f1a49).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8922      +/-   ##
==========================================
+ Coverage   53.11%   53.14%   +0.03%     
==========================================
  Files         935      935              
  Lines       63156    63156              
  Branches     4252     4250       -2     
==========================================
+ Hits        33543    33564      +21     
+ Misses      29510    29490      -20     
+ Partials      103      102       -1     
Flag Coverage Δ
packages 53.14% <ø> (+0.03%) ⬆️
see 4 files with indirect coverage changes
🚀 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.

The formatter rejects the current wrapping in the vault rotation dialog, which
fails lint for every open PR.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – wallet-ui August 28, 2026 23:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – nebula August 28, 2026 23:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – thirdweb_playground August 28, 2026 23:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – docs-v2 August 28, 2026 23:32 Inactive
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e1406170-f917-4af8-af6d-3f1aa6151ded

📥 Commits

Reviewing files that changed from the base of the PR and between 396d7c1 and f4f1a49.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/components/rotate-admin-key.client.tsx

Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

The dashboard now uses the new AI endpoint, sends nested chat context, and uses the x-thirdweb-team-id header. The vault key capture expression is reformatted without behavior changes.

Changes

AI API contract

Layer / File(s) Summary
Update AI request routing and headers
apps/dashboard/src/@/constants/public-envs.ts, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/ai/api/chat.ts, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/ai/api/fetchWithAuthToken.ts
The default AI host uses https://api.thirdweb.com/ai. Chat requests always send nested context fields. Chat and authentication requests use x-thirdweb-team-id.

Vault key capture formatting

Layer / File(s) Summary
Reformat key capture expression
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/vault/components/rotate-admin-key.client.tsx
The keysCaptured expression is reformatted onto one line. Its behavior is unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f4f1a

This PR updates AI request routing and request formatting without any identified merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: routing dashboard AI requests through the gateway.
Description check ✅ Passed The description explains the main API host, header, and request-shape changes. It omits explicit Notes for the reviewer and How to test sections, but it remains sufficiently complete and relevant.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ai/point-dashboard-at-ai-service

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

@0xFirekeeper
0xFirekeeper merged commit d85277b into main Aug 28, 2026
25 checks passed
@0xFirekeeper
0xFirekeeper deleted the ai/point-dashboard-at-ai-service branch August 28, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant