def _create_openai_model(model_name: str, api_key_name: str = "OPENAI_API_KEY"):
    """Helper function to create an OpenAI model with specified model name and API key."""
    client, error = _create_openai_client(api_key_name)
    if error:
        return None, error
    return OpenAIModel(model_name, provider=OpenAIProvider(openai_client=client)), None
Helper function to create an OpenAI model with specified model name and API key.
src/upsonic/server/level_utilized/utility.py