Skip to content

Conversation

@smurching
Copy link
Contributor

What changes are proposed in this pull request?

Per customer request, adds support for passing additional optional kwargs to databricks.sdk.WorkspaceClient().get_open_ai_client(). This enables use cases like specifying a custom timeout and retry policy for latency-sensitive workloads, e.g:

>>> # Configure custom timeout and retries
>>> client = workspace_client.serving_endpoints.get_open_ai_client(
...     timeout=30.0, 
...     max_retries=5
... )

How is this tested?

Updated unit tests

…I client for Databricks model serving

Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
}

# Update with any additional parameters passed by the user
client_params.update(kwargs)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to make it so you can't override the default client_params since it'll break compatibility w/ databricks model serving? we could also document what the defaults are

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, seems safe to block overriding those & throw to start

Copy link

@bbqiu bbqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm after discussing the one comment, thank you for adding this!

Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1025
  • Commit SHA: 0f5bacf6c21572b93c10d634034848e265d4d00c

Checks will be approved automatically on success.

Copy link
Contributor

@hectorcast-db hectorcast-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hectorcast-db hectorcast-db added this pull request to the merge queue Aug 21, 2025
Merged via the queue into databricks:main with commit 8d205cc Aug 21, 2025
17 checks passed
deco-sdk-tagging bot added a commit that referenced this pull request Sep 2, 2025
## Release v0.65.0

### New Features and Improvements

* Added support for passing additional kwargs to `WorkspaceClient().serving_endpoints.get_open_ai_client()` ([#1025](#1025)). Users can now pass standard OpenAI client parameters like `timeout` and `max_retries` when creating an OpenAI client for Databricks Model Serving.

### API Changes
* Added `comment` field for `databricks.sdk.service.dashboards.GenieSendMessageFeedbackRequest`.
* [Breaking] Added `rating` field for `databricks.sdk.service.dashboards.GenieSendMessageFeedbackRequest`.
* Added `effective_enable_pg_native_login` and `enable_pg_native_login` fields for `databricks.sdk.service.database.DatabaseInstance`.
* Added `task_retry_mode` field for `databricks.sdk.service.jobs.Continuous`.
* Added `source_configurations` field for `databricks.sdk.service.pipelines.IngestionPipelineDefinition`.
* Added `app_id`, `app_id_set`, `auth_secret`, `auth_secret_set`, `channel_url`, `channel_url_set`, `tenant_id` and `tenant_id_set` fields for `databricks.sdk.service.settings.MicrosoftTeamsConfig`.
* Added `ensure_reranker_compatible` field for `databricks.sdk.service.vectorsearch.GetIndexRequest`.
* Added `reranker` field for `databricks.sdk.service.vectorsearch.QueryVectorIndexRequest`.
* [Breaking] Changed `create_clean_room_asset_review()` method for [w.clean_room_assets](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/cleanrooms/clean_room_assets.html) workspace-level service with new required argument order.
* [Breaking] Changed `send_message_feedback()` method for [w.genie](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/dashboards/genie.html) workspace-level service with new required argument order.
* Changed `notebook_review` field for `databricks.sdk.service.cleanrooms.CreateCleanRoomAssetReviewRequest` to no longer be required.
* [Breaking] Changed `features` field for `databricks.sdk.service.ml.FeatureList` to type list[`databricks.sdk.service.ml.LinkedFeature`] dataclass.
* [Breaking] Removed `feedback_rating` and `feedback_text` fields for `databricks.sdk.service.dashboards.GenieSendMessageFeedbackRequest`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants