Repository navigation
fix(mpc): read AA's free list; the legacy data path is retired - #11
Merged
Merged
Conversation
Artificial Analysis retired /api/v2/data/* on 2026-11-04 and answers 410 Gone, so --bench aa failed at the request. The replacement free list returns the same two fields mpc needs (evaluations.artificial_analysis_intelligence_index and performance.median_output_tokens_per_second) with the same pagination; the paid list at /language/models answers 403 without a Pro plan, so the free one is the default path. Also splits the failure message by cause: a retired path is not a bad key, and the old text told every non-200 to set AA_API_KEY. Version 0.1.7.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeffreyJYZ
approved these changes
Nov 9, 2026
This branch was successfully 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.
mpcdied at startup with:That message is wrong on both halves — the key was present, and the cause was not credentials.
Root cause
Artificial Analysis retired the whole legacy subtree, and
API_URLpointed straight at it:Fix
API_URL→https://artificialanalysis.ai/api/v2/language/models/free.Probed with a real key before changing anything:
Both fields mpc reads survive unchanged, pagination shape is identical, so the parser needed no edit — and the free tier avoids needing a Pro plan at all.
Second half of the fix is the message:
statusHint()now separates 401 (bad key), 403 (needs Pro), 404/410 (endpoint retired, link to the migration guide), 429 (quota) from an unexpected response, instead of blamingAA_API_KEYfor all of them.Verified
bun run src/index.ts --bench aafills both columns again:Gates:
bun checkclean,bun test113 pass / 0 fail,bun fmt --checkclean, biome clean. Version0.1.7.oc-cmd-compare/AGENTS.mdrecords the new endpoint and why the paid one is not used.