How it was built

A pipeline collects the intelligence, speed and price of AI language models every day and models them into the two report pages before this one. This page is the engineering behind it: the scale, how the data flows, the dbt project, and the decisions that matter.

29
Days of daily snapshots
since 2026-11-05
92
Model families tracked
since 2026-11-05; 89 on the latest snapshot
114
dbt data tests
keys, grains, ranges, business rules
129
pytest tests
offline: fetchers, scripts, report guards

How the data flows

dbt + DuckDB (one local file) same dbt project Artificial Analysis public API OpenRouter public API Raspberry Pi daily timer + fetchers Raw JSON files bronze · append-only Staging silver · typed Intermediate silver · joined Marts gold · for the report This site Evidence, static Synthetic raw JSON generated, no live APIs GitHub Actions pytest + dbt build, no secrets
Swipe sideways to see the whole diagram.
Each source is fetched once a day and saved unchanged (bronze). dbt types and joins it (silver) and builds the tables this site reads (gold). CI runs the same dbt project on generated data, with no secrets and no live API calls.

The dbt project

Sources: raw JSON Seed Staging Intermediate Marts aa.models raw JSON openrouter.models raw JSON stg_aa__models table stg_openrouter__models table model_map seed int_models_matched view dim_model table fct_model_daily incremental int_models_family_best_daily view mart_leaderboard table mart_price_performance table mart_price_trend table
Swipe sideways to see the whole diagram.
Generated from dbt's own manifest, the same source as the project README, so it cannot drift from the code. Columns follow the dependencies: every arrow points to the right.

Design decisions

  • Append-only bronze, parsed on read. Raw API responses are saved unchanged, one file per source per day, and the models read the JSON by path. History needs no snapshots, and an API change becomes a model change instead of a lost fetch.
  • Many-to-one seed with warn tests. The two sources share no key, so a reviewed mapping table links many Artificial Analysis variants to one OpenRouter model. Warn-level tests flag new or suspicious matches without blocking the build.
  • Model family = best variant. Reasoning-effort variants collapse into one family row (the highest scorer, the cheaper one on a tie), so rankings and prices compare like with like.
  • $0 is a price, missing is not. Artificial Analysis separates free from not measured, and so do the marts: intelligence per dollar is only computed above $0, and an unpriced model is "not comparable", never "dominated".
  • Generated fixtures in CI. CI builds synthetic raw files from the mapping seed, so the whole dbt project and its tests run on real joins with no secrets, no API calls and no raw data in git.
  • Older Evidence, pinned, for a static site. Evidence's current line builds into a container with a live server; the pinned open-source line outputs plain static files that any web host can serve.

Stack: Python · dbt · DuckDB · GitHub Actions · Evidence · Cloudflare Pages

Data: Artificial Analysis, OpenRouter. Model intelligence, speed and pricing data provided by Artificial Analysis; model catalogue from OpenRouter.