The current logic assumes that `OPENAI_API_KEY` or `NCSA_HOSTED_API_KEY` is set, but if both are set `OPENAI_API_KEY` is preferred.