Skip to content

Conversation

@ridmii
Copy link

@ridmii ridmii commented Jan 8, 2026

Description

Fixes backend startup failures caused by mixed Weaviate client APIs (v3 vs v4).

Problem

When setting up the backend locally, contributors encounter runtime errors due to mixed usage of Weaviate client APIs (v3-style imports like from weaviate import classes vs v4-style APIs like WeaviateClient).

Changes Made

  • backend/app/database/weaviate/client.py: Updated to use Weaviate v4 API (connect_to_local() instead of use_async_with_local())
  • backend/app/database/weaviate/scripts/create_schemas.py: Updated to use get_weaviate_client async context manager
  • Removed deprecated v3-style await client.connect() and await client.close() calls
  • Ensured consistent v4 API usage throughout the codebase

Testing

  • Weaviate v4.15.4 is properly installed
  • All imports work correctly
  • Client creation uses v4 API patterns
  • Resolves import errors and mixed API conflicts
  • Backend can start without Weaviate API conflicts

Impact

Backend now starts successfully without Weaviate API conflicts in clean environments.

Closes #218 @smokeyScraper

- Update client.py to use weaviate.connect_to_local() (v4)
- Update create_schemas.py to use get_weaviate_client context manager
- Remove deprecated v3 API calls (use_async_with_local, connect, close)
- Fix mixed API usage causing startup failures (AOSSIE-Org#218)
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.

Backend startup fails due to mixed Weaviate client APIs (v3 vs v4)

1 participant