Skip to content

Commit

Permalink
fix(provider): ensure base_url is always included in params
Browse files Browse the repository at this point in the history
Previously, the base_url was only added to params if a proxy was configured. This change ensures that base_url is included in params regardless of whether a proxy is set. This improves the flexibility and correctness of the configuration handling.
  • Loading branch information
ElvisClaros committed Feb 21, 2025
1 parent 07d4be2 commit 0594430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metagpt/provider/openai_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def _get_proxy_params(self) -> dict:
params = {}
if self.config.proxy:
params = {"proxies": self.config.proxy}
if self.config.base_url:
params["base_url"] = self.config.base_url
if self.config.base_url:
params["base_url"] = self.config.base_url

return params

Expand Down

0 comments on commit 0594430

Please sign in to comment.