MergeCost

Supported stacks

MergeCost records what each request does while your tests run. These are the frameworks and libraries it understands today.

Python

AreaSupportedEndpoint key example
Django & DRFpytest + pytest-django, or manage.py test"GET api/posts/<int:pk>/"
FastAPI / StarletteTestClient, httpx ASGITransport; mounted sub-apps"GET /posts/{post_id}"
Flaskapp.test_client()"GET /posts/<int:post_id>"
Celeryeager tasks; a task outside a request is priced on its own"TASK app.tasks.send_email"
DatabasesDjango ORM, SQLAlchemy (sync and async) — any database they support
HTTP clientsrequests, httpx, httpx2
LLM SDKsOpenAI (chat completions, responses), Anthropic (messages)

Django with manage.py test: set test_command: "python manage.py test --testrunner pytest_mergecost.django_runner.MergeCostDiscoverRunner" (automatic setup does this for you).

Node.js

AreaSupportedEndpoint key example
Expresssupertest, sub-routers"GET /posts/:id"
Fastifyfastify.inject (Fastify 4; Fastify 5 needs Jest ESM support)"GET /posts/:id"
NestJSon the Express or Fastify adapter"GET /posts/:id"
Test runnersJest, Vitest
Databasespg, mysql2, better-sqlite3, Prisma — and ORMs built on these drivers (knex, Sequelize, TypeORM, Drizzle)
HTTPglobal fetch, http/https (axios, got, node-fetch)
LLM SDKsOpenAI, Anthropic
Logsconsole.*, pino, winston and anything writing to stdout/stderr

Jest and Vitest configuration

// jest.config.js
let withMergeCost = (c) => c;
try { ({ withMergeCost } = require('@mergecost/node/jest')); } catch (e) {}
module.exports = withMergeCost({ testEnvironment: 'node' });

// vitest.config.ts
import { withMergeCost } from '@mergecost/node/vitest';
export default withMergeCost(defineConfig({ /* your config */ }));

Recording only happens when MERGECOST=1, which the MergeCost job sets. Local test runs are unaffected.

CI and cloud

  • CI: GitHub Actions. GitLab CI and Bitbucket are planned.
  • Cloud prices: AWS (CloudWatch Logs, data transfer, RDS/Aurora). GCP and Azure are planned.

Static scan

Changed Python, JavaScript and TypeScript files are also scanned for database, HTTP, LLM and log calls added inside loops. These appear as “possible risks” without a dollar amount, because untested code cannot be measured.

Not supported yet

  • Rails, Laravel/PHP, Java/Spring and Go (planned).
  • Streamlit, Gradio and other UI frameworks without HTTP endpoints.
  • Repositories without API tests — MergeCost measures; it does not guess.
  • Koa, Hapi and Next.js route handlers (requests appear as <unresolved>); MongoDB.

Want your stack next? Tell us.