feat(pry): phase 0 — split routers, add tests, apify schema, pry api key (#5)
Some checks failed
CI / Secret scan (gitleaks) (push) Successful in 34s
CI / Security audit (bandit) (push) Successful in 35s
CI / test (push) Successful in 1m23s
CI / lint (push) Failing after 49s
CI / typecheck (push) Successful in 55s

This commit is contained in:
Crypto Rug Munch 2026-07-03 03:43:02 +02:00
parent dec3db9618
commit 8b52f14774
63 changed files with 11764 additions and 9818 deletions

View file

@ -20,7 +20,7 @@ def client() -> TestClient:
def test_get_or_key_from_env(monkeypatch) -> None:
monkeypatch.setattr("api.settings.openrouter_api_key", "sk-test-key-123")
from api import _get_or_key
from routers.vision import _get_or_key
key = _get_or_key()
assert key == "sk-test-key-123"
@ -29,14 +29,14 @@ def test_get_or_key_from_env(monkeypatch) -> None:
def test_get_or_key_empty_when_not_set(monkeypatch) -> None:
monkeypatch.setattr("api.settings.openrouter_api_key", "")
monkeypatch.setattr("os.path.isfile", lambda p: False)
from api import _get_or_key
from routers.vision import _get_or_key
key = _get_or_key()
assert key is None
def test_vision_models_fallback_list() -> None:
from api import VISION_MODELS_FALLBACK
from routers.vision import VISION_MODELS_FALLBACK
assert len(VISION_MODELS_FALLBACK) >= 3
assert all("free" in m for m in VISION_MODELS_FALLBACK)