AiGatewayConfig non backward compatibly issue from 16.3 to 16.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2025 04:08 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2025 05:06 AM
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:
import databricks.sdk.service.serving as serving
dir(serving)
This helps identify if AiGatewayConfig is renamed, moved, or gone.
3. Update Your Imports
-
If
AiGatewayConfigis 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
AiGatewayConfigimport: 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
from databricks.sdk.service.serving import (
ServedModelInput,
EndpointCoreConfigInput,
TrafficConfig,
Route,
# AiGatewayConfig, # Remove this if not present
AiGatewayInferenceTableConfig,
)
or, if you find a new location:
from databricks.sdk.service.ai_gateway import AiGatewayConfig
(Replace with actual path if changed.)
Next Steps
-
Check if you use
AiGatewayConfigdirectly; 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.