# srujan-egin/llm-gateway-eval architecture

> Architecture diagram of the GitHub repository srujan-egin/llm-gateway-eval, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/srujan-egin/llm-gateway-eval
- Repository: https://github.com/srujan-egin/llm-gateway-eval

## Overview

This repository is an evaluation lab for comparing LiteLLM, Bifrost, and MLflow AI Gateway against shared functional, fallback, retention, security, and latency requirements. The main workflow is to start configured gateway containers and a deterministic fake provider, run the checks, then produce a comparison report. The graph focuses on that runtime evaluation workflow and its measurement and reporting branches; it does not map build or test-infrastructure details. Gateway behavior is evaluated as an external service, not implemented here.

Main entry points: [`scripts/run_eval.py`](https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/run_eval.py) (Run coordinator), [`tests`](https://github.com/srujan-egin/llm-gateway-eval/tree/main/tests) (Gateway checks), [`mock_provider/server.py`](https://github.com/srujan-egin/llm-gateway-eval/blob/main/mock_provider/server.py) (Fake model provider), [`scripts/latency_probe.py`](https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/latency_probe.py) (Latency probe)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Evaluation orchestration"]
  node_runner["Run coordinator<br/>[run_eval.py]"]
end

subgraph group_services["Gateway services"]
  node_mock["Fake model provider<br/>[server.py]"]
  node_litellm["LiteLLM Proxy"]
  node_bifrost["Bifrost"]
  node_mlflow["MLflow Gateway"]
  node_mlflow_login["MLflow login add-on"]
  node_postgres[("Postgres")]
end

subgraph group_measurement["Evaluation and measurement"]
  node_checks["Gateway checks"]
  node_probe["Latency probe<br/>[latency_probe.py]"]
end

subgraph group_reporting["Results reporting"]
  node_report["Report generator<br/>[make_report.py]"]
end

node_engineer(("Evaluator"))

node_engineer -->|"starts evaluation"| node_runner
node_runner -->|"starts provider"| node_mock
node_runner -->|"starts and configures"| node_litellm
node_runner -->|"starts and configures"| node_bifrost
node_runner -->|"starts and configures"| node_mlflow
node_runner -->|"starts and configures"| node_mlflow_login
node_runner -.->|"starts database"| node_postgres
node_litellm -->|"routes model requests"| node_mock
node_bifrost -->|"routes model requests"| node_mock
node_mlflow -->|"routes model requests"| node_mock
node_mlflow_login -->|"routes model requests"| node_mock
node_litellm -->|"stores gateway data"| node_postgres
node_runner -->|"runs checks"| node_checks
node_checks -->|"tests gateway"| node_litellm
node_checks -->|"tests gateway"| node_bifrost
node_checks -->|"tests gateway"| node_mlflow
node_checks -->|"tests security"| node_mlflow_login
node_runner -->|"runs timing client"| node_probe
node_runner -->|"generates report"| node_report

click node_runner "https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/run_eval.py"
click node_mock "https://github.com/srujan-egin/llm-gateway-eval/blob/main/mock_provider/server.py"
click node_checks "https://github.com/srujan-egin/llm-gateway-eval/tree/main/tests"
click node_probe "https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/latency_probe.py"
click node_report "https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/make_report.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner toneBlue
class node_mock,node_litellm,node_bifrost,node_mlflow,node_mlflow_login,node_postgres toneAmber
class node_checks,node_probe toneMint
class node_report toneRose
class node_engineer toneIndigo
```

## Components

### Evaluation orchestration

- [Run coordinator](https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/run_eval.py): `scripts/run_eval.py`

### Gateway services

- [Fake model provider](https://github.com/srujan-egin/llm-gateway-eval/blob/main/mock_provider/server.py): `mock_provider/server.py`
- **LiteLLM Proxy**
- **Bifrost**
- **MLflow Gateway**
- **MLflow login add-on**
- **Postgres**

### Evaluation and measurement

- [Gateway checks](https://github.com/srujan-egin/llm-gateway-eval/tree/main/tests): `tests`
- [Latency probe](https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/latency_probe.py): `scripts/latency_probe.py`

### Results reporting

- [Report generator](https://github.com/srujan-egin/llm-gateway-eval/blob/main/scripts/make_report.py): `scripts/make_report.py`

### Other components

- **Evaluator**

## Connections

- Evaluator → Run coordinator: starts evaluation (evidence: `README.md`)
- Run coordinator → Fake model provider: starts provider (evidence: `scripts/run_eval.py`)
- Run coordinator → LiteLLM Proxy: starts and configures (evidence: `scripts/run_eval.py`)
- Run coordinator → Bifrost: starts and configures (evidence: `scripts/run_eval.py`)
- Run coordinator → MLflow Gateway: starts and configures (evidence: `scripts/run_eval.py`)
- Run coordinator → MLflow login add-on: starts and configures (evidence: `scripts/run_eval.py`)
- Run coordinator → Postgres: starts database
- LiteLLM Proxy → Fake model provider: routes model requests (evidence: `README.md`)
- Bifrost → Fake model provider: routes model requests (evidence: `README.md`)
- MLflow Gateway → Fake model provider: routes model requests (evidence: `README.md`)
- MLflow login add-on → Fake model provider: routes model requests (evidence: `README.md`)
- LiteLLM Proxy → Postgres: stores gateway data (evidence: `README.md`)
- Run coordinator → Gateway checks: runs checks (evidence: `scripts/run_eval.py`)
- Gateway checks → LiteLLM Proxy: tests gateway (evidence: `README.md`)
- Gateway checks → Bifrost: tests gateway (evidence: `README.md`)
- Gateway checks → MLflow Gateway: tests gateway (evidence: `README.md`)
- Gateway checks → MLflow login add-on: tests security (evidence: `README.md`)
- Run coordinator → Latency probe: runs timing client (evidence: `README.md`)
- Run coordinator → Report generator: generates report (evidence: `scripts/run_eval.py`)
