Skip to content

fix: accept result_mode as compatibility extra field - #235

Open
gdccyuen wants to merge 1 commit into
Ontos-AI:mainfrom
gdccyuen:fix/gdccyuen/accept-result-mode-compat
Open

fix: accept result_mode as compatibility extra field#235
gdccyuen wants to merge 1 commit into
Ontos-AI:mainfrom
gdccyuen:fix/gdccyuen/accept-result-mode-compat

Conversation

@gdccyuen

Copy link
Copy Markdown

What

The dashboard's upload flow (file-upload-flow.tsx) sends result_mode in the job creation payload, but the API removed this field. The request is rejected with 400 Unsupported job-create fields.

Fix

Add result_mode to _PUBLIC_COMPATIBILITY_EXTRA_FIELDS in apps/api/app/services/document_ingestion/service.py so it's silently ignored instead of rejecting the whole request.

Context

  • result_mode was removed from JobMetadata (comment: "result_mode was removed and is no longer supported")
  • The dashboard's JobCreate type still includes result_mode: "auto" | "inline" | "url" (server/external-api/jobs.ts)
  • This causes every dashboard upload to fail with 400 Bad Request against the current API

Verification

Tested end-to-end with a local Docker Compose deployment — uploads succeed after this fix.

Dashboard still sends result_mode in job creation requests but the
API removed it. Add to _PUBLIC_COMPATIBILITY_EXTRA_FIELDS so it's
silently ignored instead of rejecting the whole request with 400.
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