diff --git a/pkg/provider/modelmgr/requesters/anthropicmsgs.py b/pkg/provider/modelmgr/requesters/anthropicmsgs.py index a6164257..6bbe4bf1 100644 --- a/pkg/provider/modelmgr/requesters/anthropicmsgs.py +++ b/pkg/provider/modelmgr/requesters/anthropicmsgs.py @@ -25,7 +25,7 @@ class AnthropicMessages(requester.LLMAPIRequester): async def initialize(self): httpx_client = anthropic._base_client.AsyncHttpxClientWrapper( - base_url=self.ap.provider_cfg.data['requester']['anthropic-messages']['base-url'], + base_url=self.ap.provider_cfg.data['requester']['anthropic-messages']['base-url'].replace(' ', ''), # cast to a valid type because mypy doesn't understand our type narrowing timeout=typing.cast(httpx.Timeout, self.ap.provider_cfg.data['requester']['anthropic-messages']['timeout']), limits=anthropic._constants.DEFAULT_CONNECTION_LIMITS, diff --git a/pkg/provider/modelmgr/requesters/chatcmpl.py b/pkg/provider/modelmgr/requesters/chatcmpl.py index c675618e..e65d908b 100644 --- a/pkg/provider/modelmgr/requesters/chatcmpl.py +++ b/pkg/provider/modelmgr/requesters/chatcmpl.py @@ -36,7 +36,7 @@ class OpenAIChatCompletions(requester.LLMAPIRequester): self.client = openai.AsyncClient( api_key="", - base_url=self.requester_cfg['base-url'], + base_url=self.requester_cfg['base-url'].replace(' ', ''), timeout=self.requester_cfg['timeout'], http_client=httpx.AsyncClient( trust_env=True,