Support separate Conversations API base URL#431
Open
annzhang-db wants to merge 1 commit into
Open
Conversation
352be3d to
97120ff
Compare
aravind-segu
reviewed
Jun 5, 2026
| @property | ||
| def conversations(self) -> Conversations: | ||
| if not hasattr(self, "_databricks_conversations_client"): | ||
| self._databricks_conversations_client = OpenAI( |
Contributor
There was a problem hiding this comment.
we should use DatabricksOpenAI here right so workspace client authorization flows through?
97120ff to
8e186a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
conversations_base_urltoDatabricksOpenAIandAsyncDatabricksOpenAIclient.conversationsthrough a cached internal OpenAI client, defaulting to{workspace_url}/api/2.1/unity-catalogclient.responseson the primary OpenAI-compatible base URL, such as AI Gateway, and allow custom Conversations API overridesHow do you know it works?
conversations_base_urloverrides while Responses API calls stay on the main client base URL.PYTHONPATH=/home/ann.zhang/databricks-ai-bridge/integrations/openai/src:/home/ann.zhang/databricks-ai-bridge/src python -m pytest tests/unit_tests/test_clients.py -k ConversationsBaseUrlfromintegrations/openai: 4 passed.python -m py_compile integrations/openai/src/databricks_openai/utils/clients.py integrations/openai/tests/unit_tests/test_clients.py.git diff --check.Note: I could not run the full
test_clients.pyin the local base environment becausepytest-asynciois not installed there, anduvcould not fetch dependencies due a PyPI DNS resolution failure.ruffwas also not installed in the local base environment.