MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _make_record

Function _make_record

tests/test_stats.py:45–65  ·  view source on GitHub ↗
(
    model: str = "moonshot/kimi-k2.5",
    tier: str = "SIMPLE",
    confidence: float = 0.9,
    method: str = "pool",
    estimated_cost: float = 0.001,
    actual_cost: float | None = None,
    savings: float = 0.95,
    ts: float | None = None,
)

Source from the content-addressed store, hash-verified

43
44
45def _make_record(
46 model: str = "moonshot/kimi-k2.5",
47 tier: str = "SIMPLE",
48 confidence: float = 0.9,
49 method: str = "pool",
50 estimated_cost: float = 0.001,
51 actual_cost: float | None = None,
52 savings: float = 0.95,
53 ts: float | None = None,
54) -> RouteRecord:
55 return RouteRecord(
56 timestamp=ts or time.time(),
57 model=model,
58 tier=tier,
59 confidence=confidence,
60 method=method,
61 estimated_cost=estimated_cost,
62 actual_cost=actual_cost,
63 savings=savings,
64 latency_us=200.0,
65 )
66
67
68class TestRouteStats:

Calls 1

RouteRecordClass · 0.90

Tested by

no test coverage detected