CLI and GitHub Action

Find every model in your code with its price and retirement date, review the cost of model changes in pull requests, and audit last month's bill locally.

The CLI ships with the JavaScript package and runs anywhere Node.js 20+ does, including Python repositories:

npx @veqen/sdk scan

Commands

Command What it does
veqen init Prints the setup for this project, from package.json (OpenAI, Anthropic, Google GenAI, the AI SDK) and requirements.txt or pyproject.toml (OpenAI, Anthropic, Google GenAI, LiteLLM, LangChain, the OpenAI Agents SDK)
veqen scan [dir] Lists every model id quoted in your source files (notebooks and Markdown are skipped) with its price, retirement date and a cheaper current option. Also flags retiring APIs, such as the Assistants API
veqen scan --fail-within 30 Exits non-zero if anything in the code retires within 30 days. Good for CI
veqen diff [base-ref] Model changes between the base ref (default origin/main) and HEAD, with the cost per 1,000 calls before and after
veqen audit [--provider openai|anthropic] Pulls the last 30 days from the OpenAI or Anthropic cost API with your admin key (OPENAI_ADMIN_KEY or ANTHROPIC_ADMIN_KEY; Anthropic is used when its key is set). The key never leaves your machine
veqen report [ledger-file] Cost by customer, feature and model from a local ledger file (default VEQEN_LEDGER_FILE, else .veqen/ledger.jsonl). The SDKs write one when you set a ledger file

Add --json to scan, or --format markdown|json to diff, for machine-readable output.

Cost at production volume

With VEQEN_API_KEY set to a key of a Pro or Team organization, veqen diff reads your last 30 days of calls per model and prices the change at your real volume: "moving summaries from gpt-4o to gpt-5-mini saves $1,912 a month". Without a key it compares per-call prices.

GitHub Action

Post a cost review on every pull request that changes a model:

# .github/workflows/veqen.yml
name: AI cost review
on: pull_request
permissions:
  contents: read
  pull-requests: write
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with: { fetch-depth: 0 }
      - uses: Keyveve/veqen-sdks/github-action@v1
        with:
          api-key: ${{ secrets.VEQEN_API_KEY }}   # optional: production volumes
          fail-within-days: 30                    # optional: fail if a model in the code is about to retire

The action comments once and updates the same comment on later pushes. With no model changes it posts nothing, or updates an earlier comment to say there are none. Production volumes in the comment need a Pro or Team key.