1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 llm, 7 llm-openrouter, 8 httpx, 9 openai, 10 pytestCheckHook, 11 inline-snapshot, 12 pytest-recording, 13 writableTmpDirAsHomeHook, 14}: 15 16buildPythonPackage rec { 17 pname = "llm-openrouter"; 18 version = "0.5"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "simonw"; 23 repo = "llm-openrouter"; 24 tag = version; 25 hash = "sha256-lofijdGKkQRQa2Hle4puIBOj+I28hGdKRILeQZOLkz4="; 26 }; 27 28 build-system = [ 29 setuptools 30 ]; 31 32 dependencies = [ 33 httpx 34 llm 35 openai 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 inline-snapshot 41 pytest-recording 42 writableTmpDirAsHomeHook 43 ]; 44 45 pythonImportsCheck = [ "llm_openrouter" ]; 46 47 passthru.tests = llm.mkPluginTest llm-openrouter; 48 49 meta = { 50 description = "LLM plugin for models hosted by OpenRouter"; 51 homepage = "https://github.com/simonw/llm-openrouter"; 52 changelog = "https://github.com/simonw/llm-openrouter/releases/tag/${version}/CHANGELOG.md"; 53 license = lib.licenses.asl20; 54 maintainers = with lib.maintainers; [ 55 arcuru 56 philiptaron 57 ]; 58 }; 59}