(base_url: str)
| 2094 | |
| 2095 | |
| 2096 | def _anthropic_messages_url(base_url: str) -> str: |
| 2097 | root = str(base_url or "").rstrip("/") |
| 2098 | if root.endswith("/messages"): |
| 2099 | return root |
| 2100 | if root.endswith("/v1"): |
| 2101 | return f"{root}/messages" |
| 2102 | return f"{root}/v1/messages" |
| 2103 | |
| 2104 | |
| 2105 | def _anthropic_transport_base(base_url: str, family: str) -> str: |