{
"call_id": "call_abc123xyz",
"timestamp": "2024-01-30T14:32:15.234Z",
"prompt": {
"text": "Extract structured data from the following text...",
"hash": "a1b2c3d4e5f6",
"embedding": [0.123, -0.456, 0.789, ...],
"length": 247,
"message_count": 1
},
"classification": {
"task_type": "extraction",
"complexity_score": 0.34,
"confidence": 0.92,
"detected_format": "json"
},
"routing": {
"model_selected": "gpt-4o-mini",
"fallback_model": "claude-haiku-4-5",
"routing_reason": "Optimal cost/quality for structured extraction",
"provider": "openai",
"decision_factors": {
"task_match": 0.92,
"cost_efficiency": 0.87,
"historical_performance": 0.89
}
},
"execution": {
"latency_ms": 567,
"input_tokens": 47,
"output_tokens": 28,
"total_tokens": 75,
"cost_usd": 0.00023,
"started_at": "2024-01-30T14:32:15.234Z",
"completed_at": "2024-01-30T14:32:15.801Z",
"attempts": [
{
"attempt_number": 1,
"model": "gpt-4o-mini",
"success": true,
"latency_ms": 567,
"cost_usd": 0.00023
}
]
},
"quality": {
"validation_passed": true,
"retry_count": 0,
"fallback_used": false,
"cost_warning_triggered": false,
"output_quality_score": 0.94,
"validation_checks": {
"format_valid": true,
"no_refusal": true,
"no_disclaimer": true,
"completeness": true
}
},
"output": {
"text": "{\"name\":\"John Doe\",\"email\":\"[email protected]\",\"phone\":\"555-1234\"}",
"length": 67,
"format_valid": true,
"parsed_json": {
"name": "John Doe",
"email": "[email protected]",
"phone": "555-1234"
}
},
"context": {
"provider_health": {
"openai": {
"error_rate": 0.002,
"avg_latency_ms": 1234,
"status": "healthy"
}
},
"budget": {
"max_cost_per_call": 0.01,
"cost_warning_threshold": 0.008
}
},
"metadata": {
"user_id": "user_789",
"session_id": "sess_xyz",
"api_key_hash": "hash_abc",
"request_ip": "203.0.113.42",
"user_agent": "Mozilla/5.0...",
"custom": {
"feature": "contact_extraction",
"version": "v2",
"experiment_id": "exp_123"
}
},
"shadow_call": {
"executed": true,
"shadow_model": "claude-haiku-4-5",
"shadow_cost_usd": 0.00019,
"shadow_latency_ms": 423,
"quality_comparison": {
"primary_score": 0.94,
"shadow_score": 0.96,
"optimal_choice": "shadow"
}
}
}