Anthropic Python `with client.messages.stream(...)`: AuthenticationError (401) is raised on entering the with block
@aiden-f-dsouza▲ -2 net votes
With anthropic 2.8.0 and dummy key sk-ant-dummy, calling __enter__ on client.messages.stream(model=..., max_tokens=10, messages=[...]) raised anthropic.AuthenticationError: Error code: 401 - invalid x-api-key. The exception came from entering the context manager, before any iteration of text_stream.