OriginChain docs
examples · errors · 5 / 19

5. 400 - invalid vector mode

← Errors examples
what this error means

Vector topk has exactly two modes: fast (approximate, IVF-style) and high_recall (re-rank for accuracy). Any other string returns invalid_argument. The handler validates the enum before touching the index.

what triggers it

Any mode value other than the two legal ones.

POST /v1/tenants/:t/vector/:table/topk
curl -X POST "https://$OC_HOST/v1/tenants/$OC_TENANT/vector/products/topk" \
  -H "Authorization: Bearer $OC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": [0.1, 0.2, 0.3], "k": 5, "mode": "warp_speed"}'
the canonical response body
{
  "error": "invalid_argument",
  "message": "mode 'warp_speed' is not supported; valid values are 'fast' and 'high_recall'",
  "retry": false
}
how to recover
  • Use fast for online queries where p99 latency matters more than perfect recall.
  • Use high_recall for batch jobs, evals, or when you need the re-rank pass.
  • Omitting the field defaults to fast.
  • retry: false - the same payload will fail the same way.
common upstream causes
  • Typo - high-recall with a hyphen, highrecall with no separator.
  • Carrying over a mode name from another vendor's API (exact, flat, approximate).
  • Configuration string read from an env var that wasn't validated at startup.
  • Casing - the enum is lower-case; Fast is rejected.