Set Up Cross-Model Agent Evals with GitHub Actions and Vercel

Comparing models is also a small platform-design problem: where do provider keys live, who can spend API credits, how do we make runs repeatable, and where can a team inspect results? This post walks through the setup I used to compare OpenAI and Meta in a fictional customer-support agent. It is Part 3 of a four-part series: Part 1 introduces the project and eval foundations; Part 2 follows its observability path. Part 4 will focus on the evals themselves and how to tune them.

Keep provider selection behind one interface

The agent uses the OpenAI Agents SDK. Meta provides an OpenAI-compatible Responses endpoint, so the project can keep the same agent instructions and tool definitions while configuring a different provider. That compatibility makes the experiment smaller; it does not mean the models behave alike or support every identical feature.

The server-side provider adapter selects the credentials and endpoint:

if (provider === "meta") {
  return {
    provider,
    model: env.META_MODEL || "muse-spark-1.3",
    modelProvider: new OpenAIProvider({
      apiKey: env.META_MODEL_API_KEY,
      baseURL: env.META_MODEL_BASE_URL || "https://api.meta.ai/v1",
      useResponses: true,
    }),
  };
}

OpenAI uses its default SDK provider and OPENAI_API_KEY; Meta uses META_MODEL_API_KEY and the compatible endpoint. Model names and provider choice are configuration. Keys remain on the server and never go into browser code or a committed .env file. For this comparison, the runner loads one shared scenario suite and constructs a provider configuration for each model. That keeps the experiment focused on the provider/model change rather than creating two separate agents.

Put paid runs behind an intentional action

Live model calls spend API credits. I chose a manually dispatched GitHub Actions workflow rather than a public dashboard button that can start a paid comparison. The workflow runs from main and uses the GitHub Production environment, where OPENAI_API_KEY and META_MODEL_API_KEY are configured as secrets. A repository writer can start a run; visitors cannot.

on:
  workflow_dispatch:

jobs:
  compare:
    if: github.ref == 'refs/heads/main'
    environment: Production
    steps:
      - name: Run offline checks before using API credits
        run: |
          pnpm test
          pnpm eval:policy
      - name: Run the paired live comparison
        run: pnpm eval:compare

That ordering catches basic code and policy regressions before the metered calls. The workflow checks that both secrets exist, then runs the same cases against both providers. It is separate from ordinary push and pull-request CI: routine CI stays deterministic and free of provider calls; a human explicitly starts the paid comparison after the change is ready.

Publish reports without publishing credentials

The comparison first writes a detailed JSON report to the ignored eval-results/ folder. The workflow then validates the report shape and checks that configured API keys do not appear in the file. Only the checked report is copied into the tracked eval-reports/ directory and committed by the GitHub Actions bot.

GitHub Actions ── API keys from Production secrets ──► OpenAI / Meta
       │                                                │
       ├─ offline tests, then paired model run ◄────────┘
       ├─ validate and commit key-free JSON report ──► GitHub
       └─────────────────────────────────────────────► Vercel rebuild
                                                           │
                                  read index.json + reports ◄┘
                                  public, read-only dashboard

The Vercel dashboard fetches the committed eval-reports/index.json and its report files. It does not hold provider keys or execute the comparison. This was a deliberate boundary: the report uses fictional data and can be public, while spending API credits requires GitHub write access. The report retains its source commit, scenario-file hashes, pricing date, and per-case results so a displayed number can be traced to the run that produced it. The dashboard is available here, and the GitHub repository contains the workflow and report history.

This design uses Git as a lightweight report store: it is simple to audit and deploy, with no database or credentials in the frontend. The tradeoff is that reports are public and repository history grows, so the publisher keeps only a bounded recent index. That is appropriate for this learning project with synthetic fixtures, not automatically suitable for real customer conversations or sensitive business data.

The run path

  1. Make a provider, scenario, or agent change and merge it to main after ordinary CI passes.
  2. In GitHub Actions, manually start Model comparison. The workflow reads the two secrets from the protected environment and runs the offline gates before live API calls.
  3. Review the completed run and its committed report. Vercel rebuilds the dashboard from GitHub; open /evals to compare the published result.

The engineering choice is to separate code validation, paid model execution, and report viewing. It gives an IC a traceable run and gives a manager a clear control over when usage occurs. Part 4 will move from this plumbing to the harder questions: what scenarios belong in the suite, what a fair grader measures, how to classify failures, and how to tune without teaching the model to game the test.

Jacob Aloysious
Jacob Aloysious
Engineering Leader

Engineering manager at Meta with 20 years of experience across enterprise platforms, developer tools, and semiconductor software. I write about leadership, architecture, and applied AI.

Related