Skip to content

Relocate chat Edge Fn into Vercel root; pin sklearn 1.7.2#30

Merged
ThomasJButler merged 1 commit into
mainfrom
deployment_fixes
Apr 24, 2026
Merged

Relocate chat Edge Fn into Vercel root; pin sklearn 1.7.2#30
ThomasJButler merged 1 commit into
mainfrom
deployment_fixes

Conversation

@ThomasJButler

Copy link
Copy Markdown
Owner

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.

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.
@vercel

vercel Bot commented Apr 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
the-premier-league-oracle Ready Ready Preview, Comment Apr 24, 2026 6:14pm

@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: ee05fccf-eb32-4539-97dc-46f564d79be4

📥 Commits

Reviewing files that changed from the base of the PR and between 02d6a56 and 5d543df.

📒 Files selected for processing (2)
  • backend/requirements.txt
  • frontend/api/chat.ts

📝 Walkthrough

Walkthrough

The pull request updates the scikit-learn dependency version from 1.6.1 to 1.7.2 in the backend requirements file. This is a straightforward version bump to leverage the newer release of the machine learning library.

Changes

Cohort / File(s) Summary
Dependency Updates
backend/requirements.txt
Updated scikit-learn from version 1.6.1 to 1.7.2.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A nibble here, a hop, a bound,
scikit-learn's now version safe and sound!
From 1.6 to 1.7.2 we go,
Where better algorithms and fixes flow! 📚✨


Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands and usage tips.

@ThomasJButler ThomasJButler merged commit 2aca6a4 into main Apr 24, 2026
2 of 6 checks passed
ThomasJButler added a commit that referenced this pull request Apr 28, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant