feat: AI-powered project price evaluation using LLM (#3)#117
Conversation
- New backend endpoint POST /api/projects/evaluate-llm that uses the existing GeminiReviewService to produce structured price suggestions - LLMPriceEvaluationRequest/Response types with task breakdown, assumptions, risks, rationale, and confidence scoring - Fallback rule-based estimation when LLM provider is unavailable - Frontend triggerAiEvaluation now calls the new LLM endpoint first, with graceful fallback to the existing rule-based /api/projects/evaluate - Proper markdown fence stripping and JSON validation for LLM responses Closes: mergeos-bounties#3
eliasx45
left a comment
There was a problem hiding this comment.
Reviewed PR #117 for bounty #3.
Verification performed:
npm test
# 9 passed
npm run build:local
# client + SSR builds completed successfully
git diff --check
# clean
GitHub checks on the PR are also green, including Backend build and test, frontend/admin/scan builds, and secret scan. I could not run go test ./... locally on this Windows host because go is not installed here, so I relied on the green GitHub backend job for backend execution proof.
Code review notes:
- The new
/api/projects/evaluate-llmroute is authenticated and falls back to rule-based pricing when no runnable LLM key is configured or the LLM response cannot be parsed. - The frontend keeps the existing rule-based endpoint as an outer fallback, and the existing
/api/projects/evaluateresponse shape already matches thesuggested_low/suggested_high/task_breakdownUI contract. - I did not find a blocking regression in the changed files.
Verdict: looks ready from my verification pass.
|
Supplemental verification for bounty verifier issue #64. Target
GitHub ActionsAll visible PR checks are green at review time:
Local verification run on macOS arm64Code review notes
Gaps / follow-up before award
VerdictNeeds maintainer review / minor follow-up, not a blind approve. The implementation builds and the existing test suite is green, but I would ask for at least focused unit tests around the new LLM parse/fallback route plus clarification of the reward amount before marking this bounty fully ready. |
Verification Report for PR #117Target PR
Build & Test Results
Files Changed
Code Review Summary
Manual Test Summary
Evidence Status
RecommendationApprove with minor suggestion – Code is functionally correct and builds cleanly. Consider adding unit tests for |
Verification Report for PR #117Target
Build Results
Code Review
Evidence Status
Manual Test Summary
Final Recommendation✅ Approve — Code is well-structured, builds pass, tests pass, follows project conventions. Adding visual evidence (screenshots of the AI evaluation dialog) would make this complete, but the code itself is ready for review. |
eliasx45
left a comment
There was a problem hiding this comment.
Re-reviewed current head 83aacd6a88ac4b606b6d3ead24dd0a2ff8db33df for bounty #3.
Verdict: approve from code/build verification.
What I verified locally on this Windows checkout:
git diff --check origin/master...HEAD
# clean
git merge-tree --write-tree origin/master HEAD
# clean merge tree: 4a611cbd781147fcac765d0afb2486d1d57da098
cd frontend
npm ci
# 0 vulnerabilities
npm test -- --runInBand
# 9 passed
npm run build:local
# client + SSR builds passed
GitHub PR checks are also green, including Secret scan, Backend build and test, Web build/test for frontend/admin/scan.
Code review notes:
- The new
/api/projects/evaluate-llmroute is authenticated viarequireUser, so it is not an unauthenticated LLM relay. - LLM request/response handling stays backend-side in
backend/internal/core/llm_price_evaluation.go; I did not see hardcoded API keys or client-side secret exposure. - The backend falls back to rule-based pricing if no runnable LLM key is configured or if LLM JSON parsing fails.
- The frontend keeps an outer fallback to the existing
/api/projects/evaluateendpoint if/api/projects/evaluate-llmerrors, so the UI degrades gracefully. - The response shape matches the existing AI price recommendation UI contract (
suggested_low,suggested_high,confidence_level,task_breakdown,assumptions,risks,rationale) and users can still apply/edit the suggested budget before publishing.
Non-blocking follow-up: the bounty text/title/comments disagree on reward amount (50 MRG in the body vs 1500 MRG elsewhere), so maintainers should settle that before payout. A screenshot or short recording of the dialog would also strengthen the evidence packet, but the implementation and hosted backend checks look merge-ready to me.
I could not run go test ./... locally because go is not installed on this Windows host; I relied on the green GitHub backend check for backend execution proof.
🚨 URGENT: Payout Address Tampered — Funds Went to Wrong Address!I am the original author of PR #117 (1500 MRG for Issue #3). Critical Issue Found:
Evidence:
Request:
This is a critical payout error. Please resolve ASAP! 🚨 |
🚨 URGENT: Payout Address Tampered — Funds Went to Wrong Address!I am the original author of PR #117 (1500 MRG for Issue #3). Critical Issue Found:
Evidence:
Request:
This is a critical payout error. Please resolve ASAP! 🚨 |
|
Reviewer note for the payout-address dispute above: I checked the public GitHub metadata for this PR. I posted the broader public PR-state audit for the listed PR set here: #106 (comment) I cannot verify private wallet settings, email notifications, or ledger payouts from public GitHub data; maintainer-side ledger review is required for any reissue decision. |
Summary
Implements AI project evaluation for price suggestion (#3). The feature enriches the existing project creation flow by providing intelligent, LLM-powered price suggestions with structured justification.
Changes
Backend (Go)
backend/internal/core/llm_price_evaluation.goLLMPriceEvaluationRequest/LLMPriceEvaluationResponsetypes with fields for suggested price range, confidence, task breakdown, assumptions, risks, and rationaleEvaluateProjectLLMmethod on*Serverthat uses the existingGeminiReviewService.generate()to query the configured LLM (Gemini/OpenAI/Anthropic)buildLLMPriceEvaluationPrompt()- constructs a structured prompt instructing the LLM to return JSON with price estimate, task breakdown, assumptions, risks, and rationaleparseLLMPriceEvaluation()- parses and validates the LLM JSON response, stripping markdown fencesfallbackPriceEvaluation()- sophisticated rule-based fallback when LLM is unavailable (considers tech stack, deliverables, complexity, timeline, constraints, reference budget)backend/internal/core/server.goPOST /api/projects/evaluate-llmat line 68evaluateProjectWithLLMthat decodes the request, callsEvaluateProjectLLM, and returns the structured responseFrontend (Vue.js)
frontend/src/App.vuetriggerAiEvaluation()to first attempt/api/projects/evaluate-llm, with graceful fallback to/api/projects/evaluateif the LLM endpoint is unavailableHow It Works
/api/projects/evaluate-llmGeminiReviewServiceQuality