gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Vendoring OpenAI SDK causing bugs

Open njbrake opened this issue 4 months ago • 2 comments

What Happened?

Working in https://github.com/mozilla-ai/any-llm , after adding portkey_ai python package, I started seeing these strange error messages in tests that should have been unrelated;

FAILED tests/integration/test_response_format.py::test_response_format[openai] - AttributeError: 'Completions' object has no attribute 'parse'

https://github.com/mozilla-ai/any-llm/actions/runs/16732735706/job/47364954288

I think what's happening is that the portkey_ai package is vendoring the openai package instead of using it, but still importing it as 'openai' which causes it to overwrite the true openai package that I had already installed and use for other parts of the code.

What Should Have Happened?

No response

Relevant Code Snippet

No response

Your Twitter/LinkedIn

https://www.linkedin.com/in/njbrake/

njbrake avatar Aug 04 '25 20:08 njbrake

tagging @csgulati09 to take a look

narengogi avatar Aug 11 '25 10:08 narengogi

Hey! The fix for it is already under review: https://github.com/Portkey-AI/portkey-python-sdk/pull/377

csgulati09 avatar Aug 11 '25 13:08 csgulati09