Skip to content

feat: add /api/accounts endpoints for account management - #152

Merged
sweetmantech merged 2 commits into
testfrom
sweetmantech/myc-4008-api-apiaccount-endpoints-from-recoup-chat
Jan 22, 2026
Merged

feat: add /api/accounts endpoints for account management#152
sweetmantech merged 2 commits into
testfrom
sweetmantech/myc-4008-api-apiaccount-endpoints-from-recoup-chat

Conversation

@sweetmantech

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Run pnpm build to verify compilation
  • Run pnpm test to verify all tests pass
  • Test POST /api/accounts with email to create new account
  • Test POST /api/accounts with existing email to retrieve account
  • Test PATCH /api/accounts to update account name
  • Test POST /api/accounts/artists to add artist association

🤖 Generated with Claude Code

Migrate account endpoints from Recoup-Chat to Recoup-API:
- POST /api/accounts - Create or retrieve account by email/wallet
- PATCH /api/accounts - Update account profile information
- POST /api/accounts/artists - Add artist to account
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercelBot commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentReviewUpdated (UTC)
recoup-apiReadyReadyPreviewJan 22, 2026 6:47pm

@coderabbitai

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

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


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 and usage tips.

@github-actions

github-actionsBot commented Jan 22, 2026

Copy link
Copy Markdown

Braintrust eval report

Catalog Opportunity Analysis Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
Catalog_availability29.9% (+26pp)3 🟢1 🔴
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration45.22s (+10.01s)1 🟢4 🔴

Catalog Songs Count Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
AnswerCorrectness19.3% (+0pp)3 🟢-
Factuality33.3% (-33pp)-1 🔴
Llm_calls4 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration13.13s (+0.26s)2 🟢1 🔴

First Week Album Sales Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
Factuality40% (-10pp)-1 🔴
Llm_calls1 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.98s (+2.58s)1 🟢3 🔴

Memory & Storage Tools Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration16.99s (+3.64s)-1 🔴

Monthly Listeners Tracking Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
AnswerSimilarity77.7% (+1pp)3 🟢2 🔴
Llm_calls2 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration12.51s (-2.75s)5 🟢-

Search Web Tool Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
AnswerCorrectness27.3% (+2pp)7 🟢4 🔴
Llm_calls3 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration26.97s (+1.83s)5 🟢6 🔴

Social Scraping Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration24.78s (+2.12s)2 🟢4 🔴

Spotify Followers Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
AnswerCorrectness20.4% (0pp)2 🟢3 🔴
Llm_calls3 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.41s (+0.67s)2 🟢3 🔴

Spotify Tools Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration33.9s (+1.33s)1 🟢1 🔴

TikTok Analytics Questions Evaluation (HEAD-1769107597)

ScoreAverageImprovementsRegressions
Question_answered0% (-5pp)-1 🔴
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration15.22s (-0.51s)1 🟢1 🔴

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comment threadapp/api/accounts/artists/route.ts
Comment threadapp/api/accounts/route.ts
export const createAccountBodySchema = z.object({
email: z.string().email("email must be a valid email address").optional(),
wallet: z.string().min(1, "wallet cannot be empty").optional(),
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
});
}).refine(
(data)=>data.email||data.wallet,
"At least one of email or wallet must be provided"
);

Validation schema allows creating accounts with neither email nor wallet, resulting in orphaned and inaccessible accounts

Fix on Vercel

Comment threadlib/accounts/createAccountHandler.ts
@sweetmantech
sweetmantech merged commit 26d2104 into testJan 22, 2026
5 checks passed
@sweetmantech
sweetmantech deleted the sweetmantech/myc-4008-api-apiaccount-endpoints-from-recoup-chat branch January 22, 2026 18:58
Sign up for freeto 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.

1 participant

@sweetmantech