Skip to content

docs(api): remove ML prediction endpoints from the API reference (vNext) - #1981

Merged
lukekim merged 3 commits into
trunkfrom
claude/api-remove-ml-predict-endpoints
Jul 27, 2026
Merged

lukekim merged 3 commits into
trunkfrom
claude/api-remove-ml-predict-endpoints

Conversation

@claudespice

Copy link
Copy Markdown
Contributor

Summary

The published HTTP API reference still documents two endpoints that no longer exist in the runtime:

Page Endpoint Status on trunk
ML Prediction (get-model-predict) GET /v1/models/{name}/predict Removed
Batch ML Predictions (post-batch-predict) POST /v1/predict Removed

spiceai/spiceai#11684 (remove(ml): delete model_components crate and ONNX/Tract ML inference, merged 2026-07-09, post-v2.1.1) deleted the model_components crate and both HTTP routes. crates/runtime/src/http/routes.rs on trunk registers no predict route at all, and ModelSource::SpiceAI/ONNX model loading is gone.

The docs sweep for that source PR updated the prose pages — features/machine-learning-models/index.md is correctly marked Deprecated in vNext and explicitly says the /v1/predict and /v1/models/{name}/predict endpoints were removed — but it missed the generated API reference, because those pages come from website/public/openapi.json (last refreshed for spiceai/spiceai#10272, spec version 2.0.0-unstable). So the docs simultaneously say the endpoints are gone and publish reference pages with "Try it" panels for them.

What changed

  • website/public/openapi.json: removed the /v1/predict and /v1/models/{name}/predict paths, plus the five schemas that were reachable only from them (PredictRequest, PredictResponse, PredictStatus, BatchPredictRequest, BatchPredictResponse). PredictionContent/PredictionContentContent are kept — those belong to /v1/chat/completions.
  • Deleted the generated pages get-model-predict.* and post-batch-predict.* under website/docs/api/HTTP/.
  • Removed the two entries from the generated website/docs/api/HTTP/sidebar.ts (AI category).

npx docusaurus gen-api-docs spice was re-run against the edited spec and produces no further changes to the remaining pages (it is idempotent here), so the diff is deletion-only — no churn in the base64 api: blobs of unrelated operations.

Version scope

vNext only. Both endpoints exist through v2.1.1, so every versioned_docs/version-*/api/HTTP/ snapshot correctly retains them (verified: 9 versioned snapshots still carry get-model-predict/post-batch-predict, and none were touched).

No page outside versioned_docs/ links to either removed page (grep -rn 'get-model-predict\|post-batch-predict' website/).

Source refs

Test plan

  • cd website && npm run build passes
  • Versioned-docs propagation checked — vNext-only removal, versioned snapshots intentionally unchanged
  • Files updated: 9 (7 deleted generated files, sidebar.ts, openapi.json)

spiceai/spiceai#11684 deleted the model_components crate and all ONNX/Tract
ML inference, including the GET /v1/models/{name}/predict and POST /v1/predict
HTTP endpoints. The vNext docs no longer describe ML model serving (the
Machine Learning Models feature page is marked deprecated), but the published
HTTP API reference still lists both endpoints because website/public/openapi.json
was never refreshed.

Remove the two paths (and their now-unreferenced PredictRequest /
PredictResponse / PredictStatus / BatchPredictRequest / BatchPredictResponse
schemas) from the OpenAPI spec, delete the generated MDX/JSON pages, and drop
the two sidebar entries under the AI category.

vNext only: both endpoints exist through v2.1.x, so the versioned snapshots
correctly keep them.
@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ Pull with Spice Passed

Passing checks:

  • ✅ Title meets minimum length requirement (10 characters)
  • ✅ Has at least one of the required labels: area/blog, area/docs, area/cookbook, dependencies
  • ✅ No banned labels detected
  • ✅ Has at least one assignee: claudespice

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Pull with Spice Failed

Passing checks:

  • ✅ Title meets minimum length requirement (10 characters)
  • ✅ Has at least one of the required labels: area/blog, area/docs, area/cookbook, dependencies
  • ✅ No banned labels detected

Failed checks:

  • ❌ At least one assignee is required for this pull request.

Please address these issues and update your pull request.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Pull with Spice Failed

Passing checks:

  • ✅ Title meets minimum length requirement (10 characters)
  • ✅ Has at least one of the required labels: area/blog, area/docs, area/cookbook, dependencies
  • ✅ No banned labels detected

Failed checks:

  • ❌ At least one assignee is required for this pull request.

Please address these issues and update your pull request.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://b66e642e.spiceai-org-website.pages.dev

@claudespice

Copy link
Copy Markdown
Contributor Author

Heads-up on the red Generate API Docs check: it is a pre-existing repo failure, not caused by this PR. The updated_openapi.yml workflow (which triggers on any website/public/openapi.json change, wipes website/docs/api/HTTP/*, regenerates, and commits the result back) dies in its Install dependencies step:

npm error `npm ci` can only install packages when your package.json and package-lock.json ... are in sync.
npm error Missing: yaml@2.9.0 from lock file

website/package.json and website/package-lock.json are untouched by this branch (git diff origin/trunk -- website/package.json website/package-lock.json is empty), and the workflow's last green run was months ago (jeadie/openapi-10272), so the lockfile drifted on trunk at some point after that — most likely during a dependency bump. Because the workflow only fires on openapi.json changes, nothing surfaced it until now.

Practical consequence: the bot cannot regenerate the API MDX for this PR, so the generated pages in the diff were produced locally with npx docusaurus gen-api-docs spice and hand-verified (see the PR description). Deploy — the check that actually validates the built site — passes.

Worth a separate npm install lockfile-refresh PR to unblock the bot; happy to open one if you'd like.

@claudespice

Copy link
Copy Markdown
Contributor Author

The red generate-api-docs check here is not caused by this PR — the workflow is broken repo-wide. It pins node-version: '20', but website/package.json declares engines: node >=24.0 and the lockfile is written by npm 11, so npm 10 fails npm ci with Missing: yaml@2.9.0 from lock file.

Tracked in #1996, fixed by #1997. This check should go green here once that lands and this branch picks up trunk.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://5e3d79c6.spiceai-org-website.pages.dev

@github-actions

Copy link
Copy Markdown
Contributor

🚀 deployed to https://0e249b63.spiceai-org-website.pages.dev

@lukekim
lukekim merged commit 1703a62 into trunk Jul 27, 2026
6 checks passed
@lukekim
lukekim deleted the claude/api-remove-ml-predict-endpoints branch July 27, 2026 16:08

This branch was successfully deployed

1 active deployment
preview — ca0a32b2 Deployed Jul 27, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants