Skip to content

Commit 601f221

Browse files
Make base_url fix stricter (#641)
1 parent 41ad407 commit 601f221

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cohere/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async def _async_wrapped(*args, **kwargs):
121121

122122

123123
def fix_base_url(base_url: typing.Optional[str]) -> typing.Optional[str]:
124-
if base_url is not None:
124+
if base_url is not None and ("cohere.com" in base_url or "cohere.ai" in base_url):
125125
return base_url.replace("/v1", "")
126126
return None
127127

0 commit comments

Comments
 (0)