Fix AIMindTool import error with minds_sdk 2.0.0 #3886
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.
Fix AIMindTool import error with minds_sdk 2.0.0
Summary
Fixes issue #3885 where
AIMindToolfails to initialize withImportErrorclaimingminds_sdkis not installed, even when it is. The root cause is that minds_sdk 2.0.0 changed its API structure - theDatabaseConfigclass no longer exists.Key changes:
DatabaseConfigclassminds_client.datasources.create()with individual parametersDatabaseConfigobjects to passing datasource name strings tominds.create()descriptionandconnection_dataoptional with empty defaults (using.get())Note: The
tablesparameter from datasource config is no longer used, as it doesn't appear in the new minds_sdk 2.0.0datasources.create()API.Review & Testing Checklist for Human
This is a medium-risk change due to API compatibility assumptions and potential breaking changes:
minds-sdk==2.0.0and verify the tool works with an actual MindsDB instance. The unit tests use mocks and don't validate against the real API.tablesparameter should still be passed somewhereminds.create(datasources=...)tablesfield is now ignored from datasource configs. Verify this doesn't break existing user workflows or if it needs to be documented as a breaking change.crwai_ds_tocrwai_ds(removed underscore). Verify this doesn't cause naming conflicts.Recommended test plan:
Notes