Skip to content

fix(api): Redirect POST handler to v2 - #276

Merged
Ayush8923 merged 2 commits into
feat/evaluation-v2from
agent/ui-fix-266
Nov 26, 2026
Merged

Ayush8923 merged 2 commits into
feat/evaluation-v2from
agent/ui-fix-266

Conversation

@kaapi-agent-bot

@kaapi-agent-bot kaapi-agent-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Closes #266

Summary

  • Redirects the POST handler in app/api/evaluations/datasets/route.ts:
    • From POST /api/v1/evaluations/datasets to POST /api/v2/evaluations/datasets.
    • Removes dependency on v1 endpoint's Langfuse credential requirement for uploads.
  • Keeps the GET handler pointing at /api/v1/evaluations/datasets for dataset listing.
  • Verified that handleCreateDataset in app/(main)/evaluations/page.tsx sends required fields: file, dataset_name, description (if present), and duplication_factor.

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran npm run dev and npm run build in the repository root and test.
  • If you've fixed a bug or added code that is tested
Original PR description

Summary

Closes #266

  • Redirects the POST handler in app/api/evaluations/datasets/route.ts from POST /api/v1/evaluations/datasets to POST /api/v2/evaluations/datasets, so dataset uploads no longer depend on the v1 endpoint's Langfuse credential requirement.
  • The GET handler in the same file is left pointing at /api/v1/evaluations/datasets since the issue is scoped to uploads (dataset listing) only.
  • Verified the existing multipart request built in app/(main)/evaluations/page.tsx (handleCreateDataset) already sends exactly the fields the issue asks to maintain: file, dataset_name, description (when present), and duplication_factor (only appended when > 1, sourced from a Select restricted to 1–5 in CreateDatasetForm.tsx). No changes were needed there.

Assumptions

  • POST /api/v2/evaluations/datasets exists on the backend, accepts the same multipart contract as v1 (file, dataset_name, description, duplication_factor), and returns a response shape compatible with what the frontend already expects (e.g. dataset_id) and with apiClient's generic { status, data } passthrough. This could not be verified from this environment (no backend/network access). Please confirm the v2 response/error shape matches v1 closely enough that no further frontend changes are needed.
  • Dataset listing (GET) was intentionally left on v1, since the issue only mentions redirecting uploads.

Test plan

  • npm run lint — passes (0 errors, pre-existing warnings only)
  • npm run build — passes
  • Manual verification against the real backend once v2 is confirmed live (not possible in this sandboxed run)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1

  • ready-for-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot changed the title fix: redirect dataset upload proxy to v2 endpoint fix(api): Redirect POST handler to v2 Sep 16, 2026
@Ayush8923
Ayush8923 changed the base branch from main to feat/evaluation-v2 November 26, 2026 03:56
@Ayush8923
Ayush8923 merged commit 5ae2c3b into feat/evaluation-v2 Nov 26, 2026
2 checks passed
@Ayush8923
Ayush8923 deleted the agent/ui-fix-266 branch November 26, 2026 03:56
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.

Evaluation: Redirect dataset uploads

1 participant