cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

AiGatewayConfig non backward compatibly issue from 16.3 to 16.4

pablogarcia
New Contributor II

We're moving form version 16.3 to version 16.4 LTD, and looks like there is a non backward compatibly issue. 

 

This is the import that I have in my code

from databricks.sdk.service.serving import (   # type: ignore # noqa
ServedModelInput, # type: ignore # noqa
EndpointCoreConfigInput, # type: ignore # noqa
TrafficConfig, # type: ignore # noqa
Route, # type: ignore # noqa
AiGatewayConfig, # type: ignore # noqa
AiGatewayInferenceTableConfig, # type: ignore # noqa
) # type: ignore # noqa

After the move in my model mosaic code I have this error

ImportError: cannot import name 'AiGatewayConfig' from 'databricks.sdk.service.serving' (/databricks/python/lib/python3.12/site-packages/databricks/sdk/service/serving.py)

1 REPLY 1

mark_ott
Databricks Employee
Databricks Employee

The error indicates that AiGatewayConfig cannot be imported from databricks.sdk.service.serving after upgrading from version 16.3 to 16.4 LTD, signaling a breaking change or removal in the SDK.

Why This Happens

With minor version updates, Databricks SDK sometimes refactors, renames, or removes classes and methods—especially in non-LTS or major public releases. The absence of AiGatewayConfig suggests it was either:

  • Removed, renamed, or moved to a different module in 16.4 LTD.

  • Deprecated and replaced by another configuration object.

How to Resolve

1. Check SDK Release Notes

Look up the official Databricks SDK release notes or changelog for version 16.4 LTD for explicit details about the removal or migration of AiGatewayConfig.

2. Inspect the Module

Try the following in a Databricks cell or Python shell to see available names:

python
import databricks.sdk.service.serving as serving dir(serving)

This helps identify if AiGatewayConfig is renamed, moved, or gone.

3. Update Your Imports

  • If AiGatewayConfig is moved, import it from its new location.

  • If it's replaced, update your code to use the new class/config.

4. Fallbacks

If you cannot find an alternative, examine the SDK documentation for examples of endpoint creation or AI Gateway configuration in version 16.4 LTD.

Quick Fix

  • Remove or replace AiGatewayConfig import: If your code doesn't depend directly on AI Gateway functionality, simply remove the import.

  • Find replacement class (if needed): Scan documentation for the correct configuration construct.

Example Update

python
from databricks.sdk.service.serving import ( ServedModelInput, EndpointCoreConfigInput, TrafficConfig, Route, # AiGatewayConfig, # Remove this if not present AiGatewayInferenceTableConfig, )

or, if you find a new location:

python
from databricks.sdk.service.ai_gateway import AiGatewayConfig

(Replace with actual path if changed.)

Next Steps

  • Check if you use AiGatewayConfig directly; if so, adapt to the new version.

  • For persistent issues, consult Databricks’ official migration guides.

Recommendation

Always validate imports and update code with each SDK upgrade, referencing release notes for deprecated or migrated features.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now