import os
import pytest
from jarvis import llm

def test_openai_no_key(monkeypatch):
    monkeypatch.delenv("OPENAI_API_KEY", raising=False)
    with pytest.raises(RuntimeError):
        llm.openai_chat("Hello")
