Skip to content

fix(mpc): read AA's free list; the legacy data path is retired - #11

Merged
JeffreyJYZ merged 2 commits into
mainfrom
fix/aa-free-endpoint
Nov 9, 2026
Merged

JeffreyJYZ merged 2 commits into
mainfrom
fix/aa-free-endpoint

Conversation

@jyzbot

@jyzbot jyzbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

mpc died at startup with:

mpc: Artificial Analysis API 410: set AA_API_KEY or use --bench cc / aa-web

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_URL pointed straight at it:

GET https://artificialanalysis.ai/api/v2/data/llms/models
410 {"error":"Gone","message":"The legacy /api/v2/data/* endpoints were retired on
     Wed, 04 Nov 2026 23:59:59 GMT. Migrate to the documented V2 API"}

Fix

API_URL → https://artificialanalysis.ai/api/v2/language/models/free.

Probed with a real key before changing anything:

/api/v2/language/models/free → 200  tier: free   200 rows/page, pagination.has_more
  evaluations.artificial_analysis_intelligence_index   27.8    (GLM-5.3-Flash)
  performance.median_output_tokens_per_second          56.51
/api/v2/language/models      → 403  "requires a Pro subscription"

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 blaming AA_API_KEY for all of them.

Verified

bun run src/index.ts --bench aa fills both columns again:

MODEL                    │ ability  tps  WIN
DeepSeek V4.1 Flash      │    39.5  256  tie
Beam 1.0                 │    17.7  396  CC only
DeepSeek V4.1 Flash Fast │    39.5  513  CC only
Ling 3.1 Flash           │    41.1   94  CC only

Gates: bun check clean, bun test 113 pass / 0 fail, bun fmt --check clean, biome clean. Version 0.1.7. oc-cmd-compare/AGENTS.md records the new endpoint and why the paid one is not used.

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.
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cmdcode-tools-site Ready Ready Preview Nov 9, 2026 1:37pm UTC

@JeffreyJYZ
JeffreyJYZ merged commit ca77186 into main Nov 9, 2026
10 checks passed
@JeffreyJYZ
JeffreyJYZ deleted the fix/aa-free-endpoint branch November 9, 2026 13:56

This branch was successfully deployed

1 active deployment
Preview — 02d8cd73 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to 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.

2 participants