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

Function provider_family_for_model

uncommon_route/cache_support.py:38–50  ·  view source on GitHub ↗
(
    model: str,
    *,
    provider_name: str | None = None,
    upstream_provider: str | None = None,
)

Source from the content-addressed store, hash-verified

36
37
38def provider_family_for_model(
39 model: str,
40 *,
41 provider_name: str | None = None,
42 upstream_provider: str | None = None,
43) -> str:
44 if provider_name:
45 return str(provider_name).strip().lower()
46 if "/" in model:
47 return model.split("/", 1)[0].strip().lower()
48 if upstream_provider:
49 return str(upstream_provider).strip().lower()
50 return "generic"
51
52
53def apply_openai_cache_hints(

Callers 4

_choose_transportFunction · 0.90
_prepare_attemptFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected