Skip to content
Source
Sign inSign up
TanStack/ai

fix(ai-sandbox-railway): a project token is enough; require railway 3.17 #2190

Draftcodyde(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/2190/headopened View on GitHub

🎯 Changes

railway 3.17 looks up the environment a project token is scoped to. With RAILWAY_TOKEN set to a project token, the Railway provider no longer needs environmentId or RAILWAY_ENVIRONMENT_ID. I maintain @tanstack/ai-sandbox-railway and work at Railway.

  • @tanstack/ai-sandbox-railway: raises the railway dependency from ^3.13.0 to ^3.17.0, so every install gets the lookup. The README and the environmentId JSDoc no longer say it's required with either kind of token: a project token supplies it, and an account or workspace token (RAILWAY_API_TOKEN) still needs it.
  • Docs: docs/sandbox/providers.md and providers-advanced.md updated to match.
  • ts-react-chat example: the Railway env check no longer asks for RAILWAY_ENVIRONMENT_ID when RAILWAY_TOKEN is set. The README and .env.example are updated.
  • Lockfile: only railway changes, from 3.13.0 to 3.17.0. 3.17 drops its tsx dependency, which removes tsx@4.23.12.

🧪 Test plan

  • pnpm run test:pr passes.
  • examples/ts-react-chat: the updated sandbox-triage.test.ts covers a project token alone, an account token with and without RAILWAY_ENVIRONMENT_ID, and no token.
  • pnpm test:e2e tests/sandbox-railway-snapshot-cleanup.spec.ts tests/sandbox-railway-startup-cancellation.spec.ts passes against railway 3.17.0.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.
  • Docs: I updated docs/ for this change, or this change is not user-facing.
  • Changeset: I added a changeset (pnpm changeset), or this PR does not change a published package.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

🤖 Generated with Claude Code

    1. 🦋 Changeset detected

      Latest commit: b3aa21bf0edc8790b92abe045e46b0377a58a61e

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 1 package
      NameType
      @tanstack/ai-sandbox-railwayPatch

      Not sure what this means? Click here to learn what changesets are.

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

    2. Important

      Draft PR not reviewed

      Draft PRs are not automatically reviewed by default.

      • Trigger a manual review

      To automatically review draft PRs, update your CodeRabbit configuration:

      reviews:
        auto_review:
          drafts: true
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share

    3. Review the following changes in direct dependencies. Learn more about Socket for GitHub.

      Diff Package Supply Chain
      Security
      Vulnerability Quality Maintenance License
      Updatednpm/​railway@​3.13.0 ⏵ 3.17.098 +1010010097 +1100

      View full report

Sign in to join this conversation.