Skip to content

OpenAI wrapper should warn on fallback wrapper #614

Description

@kcarnold

We had code that was using openai.chat.completions.parse (notice, not .beta). This was silently hitting the fallback __getattr__ in the OpenAI wrappers (e.g.,

return getattr(self._original, name)
and similar patterns throughout that file). That meant that we were at best not logging those endpoints, and at worst crashing when we were trying to pass posthog_distinct_id etc. to it.

I'm not sure what the right behavior is, but the silent fallback bit us and led to crashes.

(Should I open a second bug for openai.chat.completions.parse not being wrapped?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions