# OpenMontage 7-Dimension Provider Scoring Algorithm Explained

> Understand OpenMontage's 7-dimension provider scoring algorithm. Discover how Cost, Quality, Latency, Reliability, Sustainability, Compliance, and Availability combine to rank your optimal media provider.

- Repository: [Calesthio/OpenMontage](https://github.com/calesthio/OpenMontage)
- Tags: deep-dive
- Published: 2026-08-30

---

**The OpenMontage scoring engine evaluates every content provider across seven weighted dimensions—Cost, Quality, Latency, Reliability, Sustainability, Compliance, and Availability—to compute a normalized composite score that ranks the optimal provider for each media generation task.**

The `calesthio/OpenMontage` repository implements this provider selection logic in [`lib/scoring.py`](https://github.com/calesthio/OpenMontage/blob/main/lib/scoring.py) through the `ProviderScorer` class. This algorithm enables the platform to intelligently route requests to external APIs—such as stock video sites, AI image generators, and text-to-speech services—by balancing monetary cost against performance metrics, legal constraints, and environmental impact.

## The Seven Dimensions of Provider Evaluation

The scoring engine normalizes each dimension to a 0–1 scale before applying configurable weights. The default weighting vector prioritizes cost and quality while maintaining minimum thresholds for reliability and compliance.

### Cost

**Cost** measures the monetary expense of API calls or license fees for the requested media unit. The algorithm multiplies the provider’s price-per-unit (e.g., dollars per image or per minute of video) by the projected job usage, then normalizes the result against the cheapest available alternative.

### Quality

**Quality** quantifies the fidelity of returned assets, including resolution, aesthetic ratings, and semantic relevance. The engine derives this value from model-specific heuristics—such as CLIP similarity scores for images or bitrate analysis for video—and maps the raw metric to the standard 0–1 scale.

### Latency

**Latency** captures the expected response time from request initiation to usable asset delivery. The scorer pulls historic latency statistics stored in `lib/providers/<provider>_metrics.py` and applies a temporal decay factor to favor recent performance data over older records.

### Reliability

**Reliability** reflects the provider’s historical success rate, excluding network timeouts and HTTP error codes. Providers maintaining greater than 95% success rates receive high reliability scores, while frequent failures trigger steep penalties in the composite calculation.

### Sustainability

**Sustainability** scores the environmental impact of the provider’s data centers and operations. This static factor is defined in each provider’s JSON descriptor (`lib/providers/<name>.json`) and scaled against a platform-wide carbon baseline.

### Compliance

**Compliance** verifies legal and policy adherence, including content licensing terms and regional usage restrictions. The engine treats this as a binary flag read from the provider configuration; non-compliant providers receive a near-zero score regardless of other metrics.

### Availability

**Availability** checks geographic and feature parity for the specific user request. The algorithm validates supported regions, media types, and required permissions listed in the provider metadata, reducing the score for any capability gaps that would prevent successful fulfillment.

## How the Scoring Engine Works

The `ProviderScorer` class in [`lib/scoring.py`](https://github.com/calesthio/OpenMontage/blob/main/lib/scoring.py) executes a six-stage pipeline to rank candidates:

1. **Gather Provider Metadata** — Load static JSON descriptors from `lib/providers/<provider>.json` containing base cost, sustainability ratings, compliance flags, and supported media types.

2. **Collect Runtime Metrics** — Retrieve dynamic performance data (latency, success-rate, quality scores) cached in `lib/providers/<provider>_metrics.py`.

3. **Normalize Scores** — Map all raw dimension values to a 0–1 range to ensure proportional contribution from each factor.

4. **Apply Weighting** — Multiply normalized values by the weight vector. The default configuration applies weights of `[0.25, 0.20, 0.15, 0.10, 0.10, 0.10, 0.10]` for cost, quality, latency, reliability, sustainability, compliance, and availability respectively. Override these via [`config_model.yaml`](https://github.com/calesthio/OpenMontage/blob/main/config_model.yaml).

5. **Compute Composite Score** — Sum the weighted dimension values to produce a final ranking score between 0 and 1.

6. **Select Provider** — Sort candidates by composite score and return the top-ranked provider capable of fulfilling the request parameters.

## Implementation in lib/scoring.py

The following example demonstrates how to instantiate the scorer and select the best video provider for a 30-second 1080p clip:

```python
from lib.scoring import ProviderScorer
from lib.providers import load_provider_descriptors

# Load all provider JSON configurations

providers = load_provider_descriptors()

# Initialize scorer with default weights

scorer = ProviderScorer(providers)

# Select optimal provider for specific requirements

best_provider = scorer.select_best(
    media_type="video",
    duration_seconds=30,
    resolution="1080p",
    region="us-east-1"
)

print(f"Selected provider: {best_provider.name}")

```

You can customize dimension weights for project-specific priorities. For instance, to prioritize sustainability over raw cost:

```python

# Define custom weighting for eco-conscious projects

custom_weights = {
    "cost": 0.10,
    "quality": 0.20,
    "latency": 0.10,
    "reliability": 0.10,
    "sustainability": 0.30,
    "compliance": 0.10,
    "availability": 0.10,
}

scorer = ProviderScorer(providers, weights=custom_weights)

best_provider = scorer.select_best(
    media_type="image",
    resolution="4k",
    region="eu-central-1"
)

```

## Summary

- The **OpenMontage 7-dimension algorithm** evaluates providers across Cost, Quality, Latency, Reliability, Sustainability, Compliance, and Availability.
- All dimensions normalize to a 0–1 scale before applying the default weight vector `[0.25, 0.20, 0.15, 0.10, 0.10, 0.10, 0.10]`.
- Static metadata resides in `lib/providers/<provider>.json`, while dynamic metrics populate `lib/providers/<provider>_metrics.py`.
- The `ProviderScorer` class in [`lib/scoring.py`](https://github.com/calesthio/OpenMontage/blob/main/lib/scoring.py) orchestrates normalization, weighting, and selection via the `select_best()` method.
- Configuration overrides are supported through [`config_model.yaml`](https://github.com/calesthio/OpenMontage/blob/main/config_model.yaml) to adjust weights for specific project requirements.

## Frequently Asked Questions

### What are the seven dimensions in OpenMontage's scoring algorithm?

The seven dimensions are **Cost** (API/license fees), **Quality** (resolution and relevance metrics), **Latency** (response time), **Reliability** (historical success rate), **Sustainability** (carbon footprint), **Compliance** (legal licensing), and **Availability** (regional and feature support). Each dimension is normalized and weighted to calculate a final composite score.

### How can I customize the scoring weights for different projects?

Pass a custom dictionary to the `ProviderScorer` constructor or modify [`config_model.yaml`](https://github.com/calesthio/OpenMontage/blob/main/config_model.yaml) to override the default weight vector. The weights must sum to 1.0 and should reflect project priorities—such as increasing the sustainability weight to 0.30 for carbon-neutral campaigns while reducing cost priority.

### Where does OpenMontage store provider performance data?

Runtime metrics including latency logs and success rates are cached in `lib/providers/<provider>_metrics.py`, while static attributes like pricing and sustainability ratings are defined in `lib/providers/<provider>.json`. The `ProviderScorer` reads both files during the ranking process.

### Why does the algorithm include a sustainability dimension?

The sustainability factor allows OpenMontage to optimize for environmental impact by penalizing providers with high carbon footprints. This dimension reads static values from provider JSON descriptors and enables eco-conscious routing decisions without sacrificing technical performance metrics.