Class PolicyAwareImageRouter

Policy-aware image provider router. Selects the preferred image generation provider and model based on the session's content policy tier.

Constructors

Methods

  • Get the ordered provider chain for a given policy tier, optionally filtered by required capabilities.

    Safe/standard returns the default chain (OpenAI-first). Mature/private-adult returns the uncensored chain (Replicate-first).

    When capabilities is provided, only providers supporting ALL listed capabilities are included. Known capabilities:

    • 'character-consistency' — Replicate (Pulid, IP-Adapter), Fal (IP-Adapter), SD-Local (ControlNet)
    • 'controlnet' — Replicate (Canny, Depth), SD-Local (ControlNet extensions)
    • 'style-transfer' — Replicate and Fal (FLUX.2), Stability (its style-transfer endpoint), OpenAI (two-image edits): the providers whose transferStyle sends both images

    Parameters

    • policyTier: PolicyTier

      Content policy tier.

    • Optional capabilities: string[]

      Optional required capabilities to filter the chain.

    Returns string[]

    Ordered array of provider IDs to try in sequence.