Add AI peer review API client (types, service, hooks)#771
Draft
nicktytarenko wants to merge 1 commit intomainfrom
Draft
Add AI peer review API client (types, service, hooks)#771nicktytarenko wants to merge 1 commit intomainfrom
nicktytarenko wants to merge 1 commit intomainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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.



What?
/api/ai_peer_review/:AiPeerReviewServicefor proposal review create/fetch, grant comparison, RFP summary, RFP refresh, and executive summary.types/aiPeerReview, transformers.hooks/useAiPeerReviewfor fetch, create, grant comparison, RFP summary, and proposal-review polling.Endpoints
POST/api/ai_peer_review/proposal-review/grant_id), enqueue processing. Returns review row (pending/processing/completed/failed, etc.).GET/api/ai_peer_review/proposal-review/<review_id>/completedorfailed).GET/api/ai_peer_review/proposal-review/grant/<grant_id>/executive_summaryfrom stored RFP summary when present.GET/api/ai_peer_review/rfp/<grant_id>/POST/api/ai_peer_review/rfp/<grant_id>/executive-summary/(Editorial feedback upsert was explicitly out of scope for this client.)
Main flow (short)
Create peer review.
POST …/proposal-review/withunified_document_id(and optionalgrant_id). You get areview_idand usually202while work runsGet PR —
GET …/proposal-review/<review_id>/on a timer untilstatusiscompletedorfailed, then useresult_data.Run the RFP comparison. For the grant context: refresh the RFP brief with
POST …/rfp/<grant_id>/Get the comparison.
GET …/proposal-review/grant/<grant_id>/returns every application row withreview_id, status, scores when complete, andexecutive_summaryfor side-by-side / hub UI.