Relocate chat Edge Fn into Vercel root; pin sklearn 1.7.2#30
Conversation
Two independent production issues in one commit: 1. AI Analysis was returning 405 because api/chat.ts lived at the repo root, outside Vercel's project root (frontend/). Vercel only detects serverless/edge functions inside the project root, so the Edge Fn was never deployed. /api/chat POSTs fell through to the SPA catch-all rewrite, which tries to POST index.html (a static file) and returns 405. Moving the file into frontend/api/ lets Vercel auto-detect and mount it at /api/chat as intended. The dev-path proxy in vite.config.ts is location-independent, so dev behaviour is unchanged. 2. Render deploy log was emitting three sklearn InconsistentVersionWarning lines because the joblib at backend/models/xgboost_free_tier.joblib was saved under sklearn 1.7.2 while the container was pinned to 1.6.1. Pinning the container to 1.7.2 matches the artifacts and removes the "might lead to breaking code or invalid results" risk. 1.7.2 is stable and API-compatible with the calls in train_free_tier.py.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request updates the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
…lator - App.svelte: swap /predictions/tools route from <KellyCalculator /> to <Tools /> - App.svelte: replace legacy `import KellyCalculator from './components/betting/...'` with `import Tools from './screens/predictions/Tools.svelte'` - Delete components/betting/KellyCalculator.svelte + KellyCalculator.test.ts (atomic with the import drop — zero remaining importers post-swap) Validation: vitest 862/862 across 71 files (was 870/870 across 72 — net -8 tests, -1 file = exactly the deleted legacy test file's 8 tests). svelte-check 0/0. Playwright routing.spec.ts 32/32 on desktop-chrome (incl. tests #30/#31 which silently end-to-end validate the new route via /suggested-bets and /accumulators redirects). Closes the P4d slice — code-complete, awaiting human eyeball; tag v3.11 at sign-off.
Two independent production issues in one commit:
AI Analysis was returning 405 because api/chat.ts lived at the repo root, outside Vercel's project root (frontend/). Vercel only detects serverless/edge functions inside the project root, so the Edge Fn was never deployed. /api/chat POSTs fell through to the SPA catch-all rewrite, which tries to POST index.html (a static file) and returns
405. Moving the file into frontend/api/ lets Vercel auto-detect and mount it at /api/chat as intended. The dev-path proxy in vite.config.ts is location-independent, so dev behaviour is unchanged.
Render deploy log was emitting three sklearn InconsistentVersionWarning lines because the joblib at backend/models/xgboost_free_tier.joblib was saved under sklearn 1.7.2 while the container was pinned to 1.6.1. Pinning the container to 1.7.2 matches the artifacts and removes the "might lead to breaking code or invalid results" risk. 1.7.2 is stable and API-compatible with the calls in train_free_tier.py.