A Practical Guide to Reproducible Multi-Provider LLM Evaluation in a Unified Framework
Learn how to evaluate multiple LLM providers fairly and reproducibly by running them through a single agent framework. This guide covers environment setup, parameter freezing, model integration steps, task design with success criteria, statistical methodology, and reporting templates for engineering teams choosing models.
1. What Questions Should Your Evaluation Answer?
This article covers model integration and evaluation workflows, not model training. After reading it, your team can directly run an evaluation using four deliverables: a frozen-variable table, a task set with success criteria, statistical definitions, and a report template.
When selecting a model, teams typically care about three things: whether the model can complete the team’s real tasks, the quality and consistency of that work, and whether cost and response speed are acceptable. The corresponding metrics are:
- Task pass rate: the proportion of passed samples out of valid samples.
- Stability: the proportion of tasks that pass all 3 repeated runs of the same task.
- Response time: elapsed time from request to complete response, recorded as median (P50) and P90.
- Per-task cost: calculated from returned token usage and the provider’s price on the day of the run.
- Failure rate: the proportion of cases where no valid result was obtained due to timeouts, server errors, or rate limiting.
Problems with testing on vendor web pages usually stem from the environment. Each platform has different system prompts, tool-calling mechanisms, context truncation strategies, and streaming UIs. Even when two models score differently, it is hard to tell whether the gap comes from the models themselves or from platform differences.
This article uses a general-purpose coding agent framework as an example: multiple vendors’ models are integrated into the same framework, run through the same toolchain and execution mode on an identical task set, and compared using fixed recording conventions. Readers can apply the same approach with their own framework of choice.
A unified framework reduces interference in three ways:
- Unified runtime environment: all models run on the same machine or cloud instance, with identical CPU, memory, network egress, and timeout settings.
- Unified toolchain: the framework’s built-in skill plugins—such as web search, long-document retrieval, and code documentation lookup—are exposed as the same set for all models.
- Unified invocation path: all requests go through a single API adapter layer, avoiding web-page parsing logic and streaming rendering that could skew judgment.
A unified framework cannot eliminate all differences. Models naturally differ in tool-calling formats, context length limits, and multimodal support. These differences should be recorded as part of the results and explained in the report.
2. Pre-Integration Checklist
Before formal integration, confirm each of the following:
- The agent framework is deployed and accessible via its web admin UI or CLI; record the framework name and version.
- Accounts on each vendor’s developer platform are active, with API access granted for the target models.
- The test machine can reach each vendor’s API endpoints, and network egress does not pass through a proxy that rewrites requests.
- The team has set a testing budget cap and per-model call quotas to prevent accidental large-batch runs from generating high costs.
- Test data contains no personal information, customer data, or internal secrets. If the business requires real data, confirm the vendor’s data retention and training-use terms first and obtain internal approval.
3. Unified Environment and Frozen Variables
Once the framework, runtime, and toolchain are fixed, freeze the parameters that affect output. The table below is a suggested initial configuration; teams may adjust it, but any adjustment must be documented in the report.
| Variable | Frozen Value | Notes |
|---|---|---|
| Run mode | Non-interactive CLI mode | Same entry point for all models; no web UI |
| System prompt | Fixed version v1.0 | Save the original text and record its SHA-256 hash |
| temperature | 0 | Reduces randomness, though some providers still show minor variance at 0 |
| top_p | 1.0 | No additional candidate truncation |
| max_tokens | 4096 | Same output cap for all models |
| Context truncation | Auto-truncation disabled | Samples exceeding the context limit are marked failed and logged separately |
| Streaming output | Disabled | Latency measured on complete responses; time-to-first-token collected separately |
| Tool switches | Web search, long-document retrieval, and code doc lookup all enabled | The tool set must be identical for all models |
| Timeout | 120 seconds | Must match timeout_seconds in the config file |
| Retry policy | Up to 3 retries on 429 with 1, 2, 4-second backoff; up to 2 retries on other errors | Retry counts logged separately |
| Concurrency cap | 4 | Maximum simultaneous requests to a single provider |
If a provider does not support a parameter—for example, it disallows setting both temperature and top_p—state the actually effective value in the report. Never silently ignore it.
4. Configuring Multi-Provider Model Integration
Integration has four steps: add a provider, save credentials and verify connectivity, fetch the model list, and manually add new models. The example below uses an OpenAI-compatible provider.
Step 1: Add the Provider
In the framework’s system settings, open the “Models” or “Inference Services” tab and select “Add Provider”. A sample configuration is shown below; field names and interface types should follow your framework’s documentation:
provider:name: vendor-a # Custom name for identificationtype: openai-compatible # Interface type; check your framework's supported listbase_url: https://api.example.com/v1 # Endpoint from the vendor's documentationapi_key: ${VENDOR_A_API_KEY} # Read from env vars or a secrets service; never hardcodetimeout_seconds: 120max_retries: 2
base_url must match the vendor’s documentation exactly. If the framework requires a manual auth header, use the format specified in the vendor docs, typically Authorization: Bearer <API_KEY>.
Step 2: Save Credentials and Verify Connectivity
API keys should be stored in environment variables or an enterprise secrets management service and injected into the configuration only by reference. Never commit keys to a code repository, logs, or screenshots.
First, send a minimal request from the CLI to confirm the connection works:
curl "https://api.example.com/v1/chat/completions" \-H "Authorization: Bearer ${VENDOR_A_API_KEY}" \-H "Content-Type: application/json" \-d '{"model":"model-name-v5.3","messages":[{"role":"user","content":"Reply only: connection OK"}],"temperature":0,"max_tokens":20}'
The expected result is HTTP 200 with “connection OK” in the response body. If it doesn’t match, first check that the model identifier and request format match the vendor docs, then revisit the framework configuration.
Common errors and how to handle them:
- 401: wrong key, or the account lacks access to this model. Verify the key and confirm model authorization in the vendor console.
- 404: incorrect
base_urlor model identifier. Both must match the vendor documentation character for character. - 429: rate limit triggered. Retry with exponential backoff per the frozen table, and keep concurrency within the cap. Time spent waiting on rate limits counts toward end-to-end latency, and retry counts are logged.
Step 3: Fetch and Verify the Model List
After entering credentials, the framework calls the provider’s model-list endpoint. If the target model appears in the list, simply select it.
The framework’s list may lag behind the vendor’s latest state, so verify manually. Use the following command to query and save the result as a version snapshot. Create a snapshots directory before running:
mkdir -p snapshotscurl -s "https://api.example.com/v1/models" \-H "Authorization: Bearer ${VENDOR_A_API_KEY}" \| tee "snapshots/vendor-a-models-$(date +%F).json" \| grep -c "model-name-v5.3"
An output of 1 or higher means the target model is in the list; 0 means it is not. A missing entry does not necessarily mean the model is unavailable—the list endpoint may simply not be synced yet. In that case, proceed to Step 4.
Step 4: Manually Add a New Model
For newly released models, the framework’s built-in adapter library may not be updated yet, so the model won’t appear in the list. In that case, use the “custom model” feature and enter the model identifier from the vendor docs, e.g. model-name-v5.3. The identifier must match the API documentation exactly, including case and version suffix. model-name-v5.3 and model-name-v5 are two different targets; a wrong version suffix means you’re testing a different model.
After adding it, repeat the minimal request from Step 2 and confirm a 200 response. Then record the addition time, model identifier, and version information from the vendor’s announcement into a snapshot file in the same directory as the model-list snapshots.
5. Task Set and Success Criteria
The task set must be finalized before the run. Record the version number in the task set file, and do not add, remove, or modify samples afterward—otherwise results will be distorted by post-hoc cherry-picking.
The table below is a ready-to-use task set design:
| Task Type | Samples | Input | Judgment Method | Pass Criteria | Repeats |
|---|---|---|---|---|---|
| Functional code generation | 30 | Requirement description with API constraints | Automated unit tests | All test cases pass | 3 |
| Bug localization and fixing | 20 | Buggy code snippet with reproduction notes | Automated tests, 10% manually reviewed | Tests pass, and changes do not exceed 20% of the original file’s lines | 3 |
| Code and documentation Q&A | 20 | Project docs and code snippets | Double-blind scoring, 1–5 scale | Both raters score at least 4 | 3 |
| Long-document retrieval Q&A | 20 | Long document plus questions with reference answers | Automated key-point matching, manual spot checks | Key-point hit rate at least 80% | 3 |
Based on this table, each model produces 270 calls across the task set, excluding retries. Estimate the budget as this count multiplied by the average per-call cost, with some headroom.
Scoring rules:
- Raters do not know which model produced each sample; outputs are presented under random identifiers.
- In double-blind scoring, if the two raters differ by more than 1 point, a third rater arbitrates. Report the inter-rater agreement rate.
- Test scripts, keyword lists, and scoring sheets are archived alongside the task set for reproducibility by others.
- With small sample sizes, confidence intervals will be wide. The report must state this, so small differences are not treated as definitive conclusions.
6. Statistical Definitions and Report Template
Statistical definitions should be fixed before computation and written into the report, preventing post-hoc selection of numbers that favor a particular model.
- Task pass rate: computed per task type. For each task, the score is passes out of 3 runs; the type-level rate is the average across all tasks of that type.
- Confidence intervals: report 95% Wilson intervals for proportion metrics, not just point estimates.
- Stability: the proportion of tasks that pass all three runs.
- Response time: report P50 and P90, not averages alone. Wait time from rate-limit retries counts toward end-to-end latency, with retry counts noted separately.
- Per-task cost: input and output tokens multiplied by the vendor’s price on the report date. Record the price source and lookup date.
- Failure exclusion rules: samples lost to network interruptions, timeouts, server-side 5xx errors, or exhausted retries are excluded from the capability denominator but counted separately with their reasons. If such failures exceed 5% for a model, the report must flag that model’s results as incomplete and its conclusions as indicative only.
- Model version snapshots: each evaluation saves the model identifier, model-list snapshot, call date, and version info from the vendor’s announcement.
Suggested report structure:
# Multi-Model Evaluation Report1. Evaluation date, framework name and version2. Frozen parameter table (with system prompt hash)3. Participating models and paths to their version snapshots4. Task set version, sample counts, and judgment rules5. Results summary: pass rate per task type (with 95% confidence intervals), stability, P50 and P90 response times, per-task cost6. Failure and exclusion statistics: failure counts and causes per model7. Conclusions and scope of applicability8. Known limitations and non-unified differences
7. Differences That Cannot Be Unified
A framework can unify the environment, but differences in the models themselves remain. Record the following honestly in the report rather than flattening them for the sake of comparability:
- Different context length limits. Overlong samples may only be valid for some models and should be flagged separately in the results.
- Different multimodal capabilities. Tasks containing images run only on supporting models; non-supporting models are marked “not applicable”, not failed.
- Different tool-calling formats. The framework adapts them, but adaptation failures must be logged.
- Different levels of adherence to the same system prompt.
- Different rate limits and quotas across providers.
8. Risks and Compliance
- Vendors may update weights or behavior without changing the model identifier. Conclusions must therefore state the evaluation date, with periodic re-testing.
- Evaluation conclusions apply only to the specific task set, frozen parameters, and evaluation date; they cannot prove a model is superior in all scenarios.
- Check network egress before testing to confirm requests are not routed through a rewriting proxy.
- Inject keys only through environment variables or a secrets service. Full keys must never appear in logs or screenshots.
- Turn this process into a team evaluation standard: run every selection exercise with the same frozen table and task set, so results can be compared across evaluations.
