diff --git a/pkgs/development/python-modules/langsmith/default.nix b/pkgs/development/python-modules/langsmith/default.nix index c6d4eb68507d..81ce98a57948 100644 --- a/pkgs/development/python-modules/langsmith/default.nix +++ b/pkgs/development/python-modules/langsmith/default.nix @@ -1,6 +1,5 @@ { lib, - stdenv, buildPythonPackage, fetchFromGitHub, @@ -14,6 +13,7 @@ requests, requests-toolbelt, uuid-utils, + xxhash, zstandard, # tests @@ -23,24 +23,25 @@ multipart, opentelemetry-sdk, pytest-asyncio, + pytest-httpx, pytest-socket, pytest-vcr, pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "langsmith"; - version = "0.6.4"; + version = "0.7.12"; pyproject = true; src = fetchFromGitHub { owner = "langchain-ai"; repo = "langsmith-sdk"; - tag = "v${version}"; - hash = "sha256-325A2kEx2UrykxVRzp6WQCPrg92Vy+6R1CfgnCLV2V8="; + tag = "v${finalAttrs.version}"; + hash = "sha256-5BVQYlp/RMFN1Ja75gz9iFneqkSuoDpqXilHbyEAPdA="; }; - sourceRoot = "${src.name}/python"; + sourceRoot = "${finalAttrs.src.name}/python"; pythonRelaxDeps = [ "orjson" ]; @@ -53,6 +54,7 @@ buildPythonPackage rec { requests requests-toolbelt uuid-utils + xxhash zstandard ]; @@ -60,9 +62,10 @@ buildPythonPackage rec { anthropic attrs dataclasses-json + multipart opentelemetry-sdk pytest-asyncio - multipart + pytest-httpx pytest-socket pytest-vcr pytestCheckHook @@ -93,6 +96,8 @@ buildPythonPackage rec { # flaky time comparisons # https://github.com/langchain-ai/langsmith-sdk/issues/2245 "tests/unit_tests/test_uuid_v7.py" + # google-adk isn't packaged (and has an enormous number of dependencies) + "tests/unit_tests/wrappers/test_google_adk.py" ]; pythonImportsCheck = [ "langsmith" ]; @@ -102,7 +107,7 @@ buildPythonPackage rec { meta = { description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform"; homepage = "https://github.com/langchain-ai/langsmith-sdk"; - changelog = "https://github.com/langchain-ai/langsmith-sdk/releases/tag/${src.tag}"; + changelog = "https://github.com/langchain-ai/langsmith-sdk/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium @@ -110,4 +115,4 @@ buildPythonPackage rec { ]; mainProgram = "langsmith"; }; -} +})