Edge-native LLM orchestration
Parallel Models One Result
Run multiple Cloudflare AI models simultaneously. Merge every output with consensus so your responses stay typed, validated, and ready for production flows.
import { dittoClient } from "ditto-ai";
const ditto = dittoClient({
endpoint: "/llm",
});
const result = await ditto({
prompt: "Summarize this email...",
strategy: "consensus",
models: [
"@cf/meta/llama-3.1-8b-instruct",
"@cf/meta/mistral-7b"
],
});Live Playground
Test Ditto right here
Pick a couple of models, run them in parallel, and inspect the structured consensus payload.
Merged Result
Run Ditto to see the merged reply.
Structured Payload
We’ll display intents, confidence, and clarification tags once a run completes.
Performance Timings
Timing metrics will appear after a run completes.
Individual Model Responses
Run Ditto to inspect each model’s answer.
Parallel Execution
Run multiple Cloudflare AI models simultaneously at the edge with low latency.
Consensus Merging
Blend every response into one reliable output with configurable merge rules.
Type-Safe Results
Validate every payload with Effect.Schema or Zod so responses stay structured.
Architecture
Edge-Native Parallel Orchestration
Send a request once. Ditto orchestrates parallel model calls on Cloudflare's edge, waits for all responses, and merges them with consensus.
Durable Object
Per-request job orchestrator
Parallel RPC Calls
All models invoked simultaneously
Consensus Merge
Intent detection + confidence scoring
Powered By
- Workers edge
- Durable Objects edge
- Effect edge
Merge Strategies
Consensus · Cooperative
Consensus: All models answer in parallel, then merge results. Cooperative: Models build sequentially, each seeing previous outputs for multi-step workflows.
Use Cases
Email Summarization
Extract structured action items with multiple models for accuracy.
Content Moderation
Consensus reduces false positives before you block a user post.
Data Extraction
Parse PDFs into validated JSON with auto retry on schema drift.