weave.monitoring.openai ignores openai.api_key (requires kwarg)

Using the Weave OpenAI monitor (weave.monitoring.openai) with the documented auth style openai."YOUR API KEY") fails: the wrapper raises KeyError: 'api_key' and then AuthenticationError: No API key provided, even though the key is set. Passing `"YOUR API KEY" explicitly as a kwarg to ChatCompletion.create works around it.

Weave's openai monitor wrapper only picked up the credentials when passed as an explicit kwarg; openai.credential = ... (the documented OpenAI SDK behavior) was ignored. This was addressed in a later Weave release (maintainer confirmed 2024-04-30). Upgrade to the latest weave version.

Source: https://github.com/wandb/weave/issues/664