Repository navigation
refactor(console): remove legacy database from Console - #54585
Conversation
There was a problem hiding this comment.
I found nothing that should block this. I type-checked packages/console/app and packages/console/function (both clean) and ran the remaining app tests (25/25 pass). No code or config in the repo still refers to the deleted packages. I also tested the new proxyInference with stubbed Resource and fetch:
- The request body reaches inference untouched.
sk-keys are sent on asBearer.x-zen-*headers are stripped.- Gemini paths go to
/google/v1beta/...and keep the query string. publickeys are sent anonymously.- Unknown paths get a 404.
- When
fetchfails, the caller gets a 503.
I couldn't check it end to end because that needs a deployed stage with new inference; your dev smoke test in the rollout plan covers that.
Public API: the OpenCode SDK, plugin API, config and CLI are unchanged. Only the hosted Console's own endpoints change (/api/support/* and /bench removed, /auth and /workspace now redirect to the new Console's login, Zen error responses now come from new inference), as described.
One thing to know: on preview stages consoleUrl is empty, so /auth and /workspace (still linked from /zen and temp.tsx) now return 404 there instead of redirecting. That seems fine, since preview stages have no new Console.
76bd75b to
8735218
Compare
Summary
The old Console no longer touches the legacy PlanetScale DB. It's now just the marketing site, docs,
/api/enterprise, and a plain/zenproxy to new inference./zen/*: forwards every request it recognises to new inference without reading the request. The DB lookup (migrated_atand BYOK provider) is gone, and so are theZEN_MODELSmodel list and the request-body re-streaming. New inference now handles keys, free-tier access, unknown models and billing./auth/*and/workspace/*now 302 to${consoleUrl}/login. Deleted the old auth context, the dashboard pages, workspace picker, user menu, referral cookie and Go referral./api/support/*), bench, theAuthApi(OpenAuth) worker and its KV, and theStatworker.packages/console/core(schema, migrations, scripts),packages/console/support,packages/console/mail.app/public/email, so emails that were already sent keep loading them.app/src/lib/aws.ts;safeEqualis now inlined into the Honeycomb webhook.Databaselink, theStudiodev command, andAUTH_API_URL/VITE_AUTH_URL.ZEN_MODELS1-30,ZEN_LIMITS,ZEN_SESSION_SECRET, the console's GitHub/Google OAuth, the dev-only Cloudflare ones, andSupportApiKeyfrom Console (Teams still uses it).Behavior change
sk-keys from workspaces that had BYOK set up are no longer rewritten to their imported connection. They're charged to the org's credits on OpenCode's provider instead. That's about 12-17k requests a day from up to 257 orgs.Kept on purpose
ZenData/ZenDataNewR2 buckets: unlinked but kept, because they hold the archived Zen request/response dumps we want to keep.Rollout
Don't deploy yet.
opencodePlanetScale database by hand. It's only looked up in infra, not managed there.