(base_url: str, family: str)
| 2103 | |
| 2104 | |
| 2105 | def _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 | |
| 2123 | def _anthropic_response_model_name(model: str) -> str: |
no outgoing calls