fix(api): Redirect POST handler to v2 - #276
Open
kaapi-agent-bot[bot] wants to merge 1 commit into
Open
kaapi-agent-bot[bot] wants to merge 1 commit into
kaapi-agent-bot[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #266
Summary
POSThandler inapp/api/evaluations/datasets/route.ts:POST /api/v1/evaluations/datasetstoPOST /api/v2/evaluations/datasets.GEThandler pointing at/api/v1/evaluations/datasetsfor dataset listing.handleCreateDatasetinapp/(main)/evaluations/page.tsxsends required fields:file,dataset_name,description(if present), andduplication_factor.Checklist
Before submitting a pull request, please ensure that you mark these task.
npm run devandnpm run buildin the repository root and test.Original PR description
Summary
Closes #266
POSThandler inapp/api/evaluations/datasets/route.tsfromPOST /api/v1/evaluations/datasetstoPOST /api/v2/evaluations/datasets, so dataset uploads no longer depend on the v1 endpoint's Langfuse credential requirement.GEThandler in the same file is left pointing at/api/v1/evaluations/datasetssince the issue is scoped to uploads (dataset listing) only.app/(main)/evaluations/page.tsx(handleCreateDataset) already sends exactly the fields the issue asks to maintain:file,dataset_name,description(when present), andduplication_factor(only appended when > 1, sourced from aSelectrestricted to 1–5 inCreateDatasetForm.tsx). No changes were needed there.Assumptions
POST /api/v2/evaluations/datasetsexists 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 withapiClient'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.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