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

Function _trace_decision_card

uncommon_route/proxy.py:2535–2553  ·  view source on GitHub ↗

Subset of the trace useful for the UI as a decision card.

(trace: "RequestTrace")

Source from the content-addressed store, hash-verified

2533
2534
2535def _trace_decision_card(trace: "RequestTrace") -> dict[str, Any]:
2536 """Subset of the trace useful for the UI as a decision card."""
2537 return {
2538 "model": trace.model,
2539 "decision_tier": trace.decision_tier or trace.tier,
2540 "served_quality": trace.served_quality,
2541 "capability_lane": trace.capability_lane,
2542 "raw_confidence": trace.raw_confidence,
2543 "latency_us": trace.latency_us,
2544 "estimated_cost": trace.estimated_cost,
2545 "route_reasoning": trace.route_reasoning,
2546 "feature_tags": list(trace.feature_tags or []),
2547 "constraint_tags": list(trace.constraint_tags or []),
2548 "hint_tags": list(trace.hint_tags or []),
2549 "transport": trace.transport,
2550 "transport_reason": trace.transport_reason,
2551 "attempts_payload": list(trace.attempts_payload or []),
2552 "fallback_reason": trace.fallback_reason,
2553 }
2554
2555
2556def _assemble_conversation(

Callers 1

_assemble_conversationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected