Skip to Content
ArchitectureData Flow

Data Flow

This page describes the primary data flows in OpenModels — how data moves from community contributions through validation into the registry, how users discover models via the API, and how telemetry is collected from providers.

Registry Contribution Flow

When a contributor adds or updates a model, provider, or mapping in the registry, the following sequence occurs:

Validation Steps

The validation pipeline performs the following checks on every pull request:

StepCheckFailure Behavior
1YAML syntax parsingRejects malformed YAML files
2JSON Schema validationRejects files that don’t match schema definitions
3Referential integrityRejects mappings referencing non-existent models or providers
4Duplicate detectionRejects duplicate model or provider IDs

Model Discovery Flow

When a user searches for models or retrieves model details through the API:

API Endpoints

Endpoint PatternDescription
/api/modelsList and search models with filtering
/api/models/{id}Get full model details
/api/models/{id}/providersList providers for a model with pricing
/api/models/{id}/compareCompare providers side-by-side
/api/models/popularPopular models ranked by relevance
/api/providersList all providers
/api/searchUnified search across models and providers
/api/telemetry/*Provider health and latency data

Telemetry Collection Flow

The telemetry system continuously monitors provider health and latency:

Telemetry Metrics

MetricCollection IntervalRetention
Health statusEvery 5 minutes30 days
Time to first token (TTFT)Every 15 minutes30 days
Total response timeEvery 15 minutes30 days
Availability (uptime %)Computed from health recordsRolling 7 days
Probe regionRecorded per measurement30 days

Probe Policies

Each provider can have a custom probe policy controlling:

  • Enabled/disabled — Whether probes run for this provider
  • Interval — Custom probe frequency (default: 15 minutes for latency, 5 minutes for health)
  • Daily limit — Maximum probes per day to control costs (default: 96)

Policies are tracked in Redis with daily counters that auto-expire after 24 hours.

Provider Ranking Algorithm

When a user requests ranked providers for a model via GET /api/telemetry/ranked/{model_id}, the API computes a composite score:

FactorWeightSource
Uptime percentage (7-day rolling)40%Health probe records
Median latency (TTFT)30%Latency probe records
Price per million tokens20%Registry mapping data
Median total response time10%Latency probe records

End-to-End Data Lifecycle

The complete lifecycle of data in OpenModels from contribution to user consumption:

  • Architecture Overview — High-level system architecture and component descriptions
  • Schemas — YAML schema definitions for models, providers, and mappings
Last updated on