diff --git a/simpleaudit/targets/decision.py b/simpleaudit/targets/decision.py index 96999d6..9aa426c 100644 --- a/simpleaudit/targets/decision.py +++ b/simpleaudit/targets/decision.py @@ -45,8 +45,8 @@ #: Ollama's request-body cap for System One requests without images. OLLAMA_MAX_BODY_BYTES = 64 * 1024 -#: OpenRouter's Decisions API (alpha). -OPENROUTER_DECISIONS_URL = "https://openrouter.ai/api/alpha/decisions" +#: OpenRouter's System One endpoint (``POST /api/v1/systemone``). +OPENROUTER_SYSTEMONE_URL = "https://openrouter.ai/api/v1/systemone" class DecisionTarget: @@ -97,7 +97,7 @@ def openrouter(cls, model: str, api_key: str | None = None, **kwargs: Any) -> De ``{"provider": {"zdr": True}}``) can be passed as ``extra_body``. """ return cls( - OPENROUTER_DECISIONS_URL, + OPENROUTER_SYSTEMONE_URL, model, api_key=api_key or os.environ.get("OPENROUTER_API_KEY"), **kwargs, diff --git a/tests/test_decision_target.py b/tests/test_decision_target.py index f26f6cb..79edcc0 100644 --- a/tests/test_decision_target.py +++ b/tests/test_decision_target.py @@ -280,7 +280,7 @@ def test_ollama_constructor(): def test_openrouter_constructor_reads_the_key_from_the_environment(monkeypatch): monkeypatch.setenv("OPENROUTER_API_KEY", "sk-env") target = DecisionTarget.openrouter("typesafe/jev-1.13", extra_body={"provider": {"zdr": True}}) - assert target.url == "https://openrouter.ai/api/alpha/decisions" + assert target.url == "https://openrouter.ai/api/v1/systemone" assert target.headers["Authorization"] == "Bearer sk-env" assert target.max_body_bytes is None assert target.extra_body == {"provider": {"zdr": True}}