Skip to content

πŸ› Bug Report: Support for Weaviate v4 and OpenAI Stable Structured OutputsΒ #3527

@hamedyosefian

Description

@hamedyosefian

Which component is this bug for?

AlephAlpha Instrumentation

πŸ“œ Description

Hi,

I encountered two compatibility issues with recent library updates:

1. Weaviate v4 Support
The current instrumentation seems to rely on Weaviate v3 logic. When using v4, it raises the following error:
ModuleNotFoundError: No module named 'weaviate.schema'

2. OpenAI Structured Outputs
It appears only client.beta.chat.completions.parse is currently instrumented.
Please add support for the new stable version (e.g., client.responses.parse).

Thanks!

πŸ‘Ÿ Reproduction steps

Reproduction steps
For Weaviate v4 Issue:

Install the latest Weaviate client: pip install "weaviate-client>=4.0.0"

Initialize OpenLLMetry/Traceloop instrumentation.

Attempt to instantiate or use the Weaviate client.

Note: The v4 client architecture (gRPC/Collections) has completely replaced the v3 schema architecture.

For OpenAI Structured Outputs:

Update openai SDK to the latest version.

Use the new stable structured output method: client.chat.completions.parse(...) or the new Responses API client.responses.parse(...).

Observe that spans/traces are not generated for these methods (only client.beta.chat.completions.parse is currently instrumented).

πŸ‘ Expected behavior

Weaviate: The instrumentation should detect weaviate-client v4 and avoid accessing the deprecated client.schema attribute, allowing successful tracing of v4 operations (e.g., client.collections.get).

OpenAI: The instrumentation should automatically patch and trace the stable parse methods (client.chat.completions.parse and client.responses.parse) just as it does for the beta version.

πŸ‘Ž Actual Behavior with Screenshots

Weaviate: The application crashes immediately upon Weaviate usage with the following error, as the instrumentation tries to access the removed v3 API:

Plaintext

AttributeError: 'WeaviateClient' object has no attribute 'schema'
ModuleNotFoundError: No module named 'weaviate.schema'
OpenAI: Calls to the new stable methods client.chat.completions.parse and client.responses.parse execute silently without being captured in the traces.

πŸ€– Python Version

No response

πŸ“ƒ Provide any additional context for the Bug.

No response

πŸ‘€ Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions