Skip to content

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

Open
kaapi-agent-bot[bot] wants to merge 1 commit into
mainfrom
agent/ui-fix-266
Open

kaapi-agent-bot[bot] wants to merge 1 commit into
mainfrom
agent/ui-fix-266

Conversation

@kaapi-agent-bot

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

Copy link
Copy Markdown

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

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 769f666d-5776-4339-a5fe-00675802b0f3

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

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

Comment @coderabbitai help to get the list of available commands.

@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

This branch has not been deployed

No deployments
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

0 participants