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

Function _anthropic_transport_base

uncommon_route/proxy.py:2105–2120  ·  view source on GitHub ↗
(base_url: str, family: str)

Source from the content-addressed store, hash-verified

2103
2104
2105def _anthropic_transport_base(base_url: str, family: str) -> str:
2106 root = str(base_url or "").rstrip("/")
2107 if not root:
2108 return root
2109 if str(family or "").strip().lower() != "minimax":
2110 return root
2111 lower = root.lower()
2112 if "commonstack.ai" in lower:
2113 return root
2114 if "openrouter.ai" in lower:
2115 return root
2116 if "/anthropic" in lower:
2117 return root
2118 if lower.endswith("/v1"):
2119 return f"{root[:-3]}/anthropic"
2120 return f"{root}/anthropic"
2121
2122
2123def _anthropic_response_model_name(model: str) -> str:

Calls

no outgoing calls