Provider Selection#
OpenMontage uses explicit delivery promises and scored provider selection to prevent silent downgrades during video production. A promise is classified and locked at the proposal stage, then carried through checkpoints into edit_decisions. Provider choices are ranked using a 7-dimension model rather than simple availability.
Delivery Promise Types#
lib/delivery_promise.py defines PromiseType values and associated PROMISE_RULES. Each rule controls whether still-image fallbacks are allowed, whether video generation is required, and the minimum motion ratio (real video, animation, or avatar cuts only; Remotion text cards and similar count as slides).
| Promise Type | still_fallback_allowed | requires_video_generation | min_motion_ratio |
|---|---|---|---|
| MOTION_LED | false | true | 0.7 |
| SOURCE_LED | true | false | 0.3 |
| DATA_EXPLAINER | true | false | 0.0 |
| TEACHER_EXPLAINER | true | false | 0.0 |
| SCREEN_DEMO | true | false | 0.0 |
| AVATAR_PRESENTER | false | true | 0.3 |
| HYBRID | true | false | 0.2 |
| LOCALIZATION | true | false | 0.0 |
classify_from_brief produces a default promise from pipeline type and user intent. The proposal stage refines it and records the full object (including motion_required, source_required, tone_mode, quality_floor, and approved_fallback) inside proposal_packet.production_plan.delivery_promise.
7-Dimension Scoring#
lib/scoring.py replaces first-available selection with weighted scoring. score_provider(tool, task_context) returns a ProviderScore; rank_providers returns a best-first list.
Dimensions and weights:
task_fit(0.30) — best match for the asset class and intentoutput_quality(0.20) — expected fidelitycontrol(0.15) — reference or style conditioning supportreliability(0.15) — historical or stability-based confidencecost_efficiency(0.10) — quality per dollar (free tools score 1.0)latency(0.05) — measured or class-based turnaroundcontinuity(0.05) — fit with already-locked providers
normalize_task_context standardizes inputs such as motion_required, prefers_generated_visuals, wants_reference_conditioning, and remaining budget. Penalties apply for mismatches (for example, an image-only tool on a motion-required video request). Results appear in proposal_packet.production_plan.provider_rankings.
Selector Routing#
Selector tools (video_selector, image_selector, tts_selector) abstract families of providers. They are discovered automatically by the registry (see Tool System).
Routing order:
- Explicit
preferred_provider(if available). - Scored ranking from
rank_providers. - Environment hints (for example
VIDEO_GEN_LOCAL_MODEL). - Declared
fallback_toolschain.
Selectors adapt input keys transparently (for example mapping query for stock tools versus prompt for generators) and return selected_tool, selected_provider, selection_reason, provider_score, and alternatives_considered. Adding a new provider tool makes it visible to the matching selector without code changes.
Enforcement in Edit Decisions#
render_runtime ("remotion" | "hyperframes" | "ffmpeg") and the full delivery_promise are locked at proposal and must be copied unchanged into edit_decisions. schemas/artifacts/edit_decisions.schema.json and proposal_packet.schema.json enforce the enum and the "locked at proposal" contract.
At compose time, DeliveryPromise.validate_cuts(cuts) recomputes the actual motion ratio and returns violations if the floor is not met. video_compose and composition_validator surface mismatches as blockers. Silent runtime swaps or motion-to-still downgrades are governance violations; the agent must log the decision, present options, and obtain explicit approval before proceeding.
These values are also recorded in decision_log.json and referenced from checkpoints. See Checkpoint System, Composition Runtimes, and Pipeline System for how artifacts and stage directors interact with locked decisions.
For provider setup details, see Configuring Providers and Provider Guide.