openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

Fix inconsistent base_url behavior in module client and OpenAIClient

Open SmartManoj opened this issue 9 months ago • 0 comments

Fixes #1373

Update base_url behavior to enforce trailing slash in module client

  • Modify src/openai/__init__.py to enforce a trailing slash for base_url in the _ModuleClient class.
  • Add a helper method _enforce_trailing_slash to the _ModuleClient class.
  • Update tests in tests/test_module_client.py to verify the consistent behavior of base_url in both module client and OpenAIClient.

For more details, open the Copilot Workspace session.

SmartManoj avatar Mar 02 '25 14:03 SmartManoj