Skip to content

fix(stainless): remove deprecated AI chat plugin to fix build OOM#258

Open
erinmikailstaples wants to merge 3 commits intomainfrom
fix/stainless-deploy-error
Open

fix(stainless): remove deprecated AI chat plugin to fix build OOM#258
erinmikailstaples wants to merge 3 commits intomainfrom
fix/stainless-deploy-error

Conversation

@erinmikailstaples
Copy link
Copy Markdown
Collaborator

@erinmikailstaples erinmikailstaples commented May 7, 2026

Describe your changes

The @stainless-api/docs-ai-chat plugin is deprecated upstream — the chat widget on the live site returns "Something went wrong" for any query, and the AI chat examples endpoint (api.stainless.com/api/ai/steelie-examples/tiger-cloud) now 404s on every build.

The plugin was also the root cause of the post-vite build OOMs killing Vercel deploys: it indexed all 692 pages for vector search during the astro:build:done phase, pushing the Node heap past the ~2GB default. With the plugin removed:

  • Local build: ~40s, 692 pages, no heap pressure (down from ~150s + OOM crash)
  • The noisy [stainless] failed to fetch AI chat examples: 404 Not Found log line is gone too — same plugin
  • 54 transitive deps disappear from the lockfile

What changed

  • astro.config.ts — removed aiChat import and the experimental.aiChat config entry
  • package.json + pnpm-lock.yaml — dropped @stainless-api/docs-ai-chat dependency
  • AGENTS.md — removed the outdated "experimental AI chat" mention from the project overview

What did not change

  • @stainless-api/docs (the main Stainless integration) and @stainless-api/ui-primitives are untouched — only the AI chat sub-plugin was removed.
  • No content, redirects, or routes are affected.

Affected pages

No content pages affected by this PR. Open the preview to confirm the build deployed successfully.

Related Issues

Issue: #number

Checklist before requesting a review

  • - This is ready for review. If not, raise as a draft PR
  • - I have reviewed my changes.
  • - I have confirmed the content is technically accurate.
  • - I have tested any code that is added or updated on the latest available version.
  • - I have confirmed the content is free of typos or grammar errors.
  • - I have verified all images and videos are clear and match production (or dev for unreleased features).
  • - This references a feature that is public. If not, add a note and we can schedule the merge for after the feature release.

The @stainless-api/docs-ai-chat plugin is deprecated upstream — the
chat widget on the live site returns "Something went wrong" for any
query, and the AI chat examples endpoint
(api.stainless.com/api/ai/steelie-examples/tiger-cloud) now 404s.

The plugin was also the root cause of the post-vite build OOMs on
Vercel: it indexed all 692 pages for vector search at build time,
pushing the Node heap past 2GB during the astro:build:done phase.
With the plugin removed, the local build finishes in ~40s with no
heap pressure (down from ~150s + OOM crash).

Removed:
- astro.config.ts: aiChat import and experimental.aiChat config
- package.json + lockfile: @stainless-api/docs-ai-chat dependency
  (plus 54 transitive deps it pulled in)
- AGENTS.md: outdated "experimental AI chat" reference

Verified locally: pnpm build:local builds 692 pages in 39.57s.
@erinmikailstaples erinmikailstaples requested a review from a team May 7, 2026 20:37
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

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

Project Deployment Actions Updated (UTC)
tiger-data-docs Ready Ready Preview, Comment May 7, 2026 8:45pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

✅ Checklist Complete

Thank you for taking the time to properly review your PR! All checklist items are complete.

@erinmikailstaples erinmikailstaples self-assigned this May 7, 2026
@erinmikailstaples erinmikailstaples added bug Something isn't working fix Small fixes, corrections, etc. labels May 7, 2026
@stainless-api/docs/stl-docs/aiChatExamples.ts has a top-level
`import z from 'zod'`, but zod is declared as a devDependency in that
package's package.json — so it isn't installed at runtime. Previously
zod was satisfied transitively through @stainless-api/docs-ai-chat;
removing that plugin in the prior commit broke the chain and Vercel's
clean install failed with "Cannot find module 'zod'".

Pinning zod as a direct dependency restores the resolution path
without bringing back the deprecated AI chat plugin. Verified with
a full `pnpm build`: 774 pages in 49.44s, no errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix Small fixes, corrections, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant