agentops
agentops copied to clipboard
instrument_llm_calls=False + stop_instrumenting() will raise on missing llm_tracker
🐛 Bug Report
🔎 Describe the Bug If you start up an agentops client with instrument_llm_calls false and stop_instrumenting() gets called, whether implicitly via Crew/Autogen or explicitly by the caller, client.py will try to reference an undefined self.llm_tracker member and throw. (Even though it is checked for truthiness, only getattr/hasattr will work when the value isn't set at all)
The fix is to explicitly set llm_tracker to None in the constructor, which will make the check later work properly with a falsy value. I will submit a fix.