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

Function _experience_snapshot

uncommon_route/router/selector.py:678–692  ·  view source on GitHub ↗
(
    store: object | None,
    model: str,
    mode: RoutingMode,
    tier: Tier,
)

Source from the content-addressed store, hash-verified

676
677
678def _experience_snapshot(
679 store: object | None,
680 model: str,
681 mode: RoutingMode,
682 tier: Tier,
683) -> CandidateExperience:
684 if store is None or not hasattr(store, "snapshot"):
685 return CandidateExperience()
686 try:
687 snapshot = store.snapshot(model, mode, tier)
688 except TypeError:
689 snapshot = store.snapshot(model, mode)
690 if isinstance(snapshot, CandidateExperience):
691 return snapshot
692 return CandidateExperience()
693
694
695def _bucket_pulls(

Callers 3

select_modelFunction · 0.85
_score_candidatesFunction · 0.85
select_from_poolFunction · 0.85

Calls 2

CandidateExperienceClass · 0.90
snapshotMethod · 0.45

Tested by

no test coverage detected