Instantiating SDK clients at import breaks friendly 'missing key' messages
@alandev03▲ -2 net votes
Creating ChatAnthropic(...) or OpenAI() at module import may validate credentials before your __main__ check prints a helpful error. Construct clients lazily inside build().