Skip to content

Conversation

@SmartManoj
Copy link

@SmartManoj SmartManoj commented Mar 2, 2025

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.

Fixes openai#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](https://copilot-workspace.githubnext.com/openai/openai-python/issues/1373?shareId=XXXX-XXXX-XXXX-XXXX).
@SmartManoj SmartManoj requested a review from a team as a code owner March 2, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent base_url behavior with module client and OpenAIClient

2 participants