Enable HTTP redirect following in DatabricksOpenAI clients#445
Merged
Conversation
Passing a custom http_client to the OpenAI SDK bypasses its default of follow_redirects=True, since httpx's Client defaults to False. Restore the intended behavior by following redirects, exposed as a follow_redirects parameter (default True) on both the sync and async clients. Co-authored-by: Isaac
Co-authored-by: Isaac
This was referenced Jun 25, 2026
jennsun
added a commit
that referenced
this pull request
Jun 25, 2026
## databricks-ai-bridge 0.21.0 databricks-openai 0.17.0 (2026-06-25) ### Improvements - databricks-openai: `DatabricksOpenAI` and `AsyncDatabricksOpenAI` clients now follow HTTP redirects by default, configurable via the new `follow_redirects` parameter (#445) ### Bug Fixes - databricks-ai-bridge: Genie now returns the full answer text aggregated from all text attachments (#432) --- Prepares the next release following #439 (0.20.0). Bumps: - `databricks-ai-bridge`: `0.20.0` → `0.21.0` (genie fix #432) - `databricks-openai`: `0.16.0` → `0.17.0` (HTTP redirect support #445), with its `databricks-ai-bridge>=` floor bumped to `0.21.0` `databricks-langchain` has no changes since 0.20.0 and is intentionally not re-released (consistent with prior releases that omitted unchanged packages). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
DatabricksOpenAIandAsyncDatabricksOpenAIpass a custom httpxhttp_clientto the OpenAI SDK. The OpenAI SDK only setsfollow_redirects=Trueon the client it builds itself; when a custom client is supplied, httpx's own default offollow_redirects=Falsetakes over, silently disabling redirect following.follow_redirects=True, applied to both the sync and async helpers for consistent behavior.follow_redirects: bool = Trueparameter on both client classes so callers can opt out if needed.Test plan
uv run pytest tests/unit_tests/test_clients.py(added tests assert the default isTrueand can be overridden toFalsefor both sync and async helpers)This pull request and its description were written by Isaac.