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

Function _bucket_pulls

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

Source from the content-addressed store, hash-verified

693
694
695def _bucket_pulls(
696 store: object | None,
697 mode: RoutingMode,
698 tier: Tier,
699) -> int:
700 if store is None or not hasattr(store, "bucket_pulls"):
701 return 0
702 try:
703 pulls = int(store.bucket_pulls(mode, tier))
704 except Exception:
705 try:
706 pulls = int(store.bucket_pulls(mode))
707 except Exception:
708 return 0
709 return max(0, pulls)
710
711
712def _bandit_bonus(

Callers 1

_score_candidatesFunction · 0.85

Calls 1

bucket_pullsMethod · 0.80

Tested by

no test coverage detected