From d588faf470b1aecfe43a23d86e139d5a9513b360 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Thu, 23 Jan 2025 13:32:27 +0800 Subject: [PATCH] fix(httpx): deprecated `proxies` param --- pkg/provider/modelmgr/requesters/anthropicmsgs.py | 2 +- pkg/provider/modelmgr/requesters/chatcmpl.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/provider/modelmgr/requesters/anthropicmsgs.py b/pkg/provider/modelmgr/requesters/anthropicmsgs.py index 25b7da17..72301efd 100644 --- a/pkg/provider/modelmgr/requesters/anthropicmsgs.py +++ b/pkg/provider/modelmgr/requesters/anthropicmsgs.py @@ -30,7 +30,7 @@ class AnthropicMessages(requester.LLMAPIRequester): timeout=typing.cast(httpx.Timeout, self.ap.provider_cfg.data['requester']['anthropic-messages']['timeout']), limits=anthropic._constants.DEFAULT_CONNECTION_LIMITS, follow_redirects=True, - proxies=self.ap.proxy_mgr.get_forward_proxies() + trust_env=True, ) self.client = anthropic.AsyncAnthropic( diff --git a/pkg/provider/modelmgr/requesters/chatcmpl.py b/pkg/provider/modelmgr/requesters/chatcmpl.py index a4119b60..9e3014af 100644 --- a/pkg/provider/modelmgr/requesters/chatcmpl.py +++ b/pkg/provider/modelmgr/requesters/chatcmpl.py @@ -39,7 +39,7 @@ class OpenAIChatCompletions(requester.LLMAPIRequester): base_url=self.requester_cfg['base-url'], timeout=self.requester_cfg['timeout'], http_client=httpx.AsyncClient( - proxies=self.ap.proxy_mgr.get_forward_proxies() + trust_env=True, ) )