Skip to content

Commit 5168bf7

Browse files
authored
mistral-vibe: 2.4.2 -> 2.5.0 (#500483)
2 parents bd484e8 + 4176f9e commit 5168bf7

7 files changed

Lines changed: 438 additions & 309 deletions

File tree

pkgs/by-name/mi/mistral-vibe/package.nix

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
python3Packages.buildPythonApplication (finalAttrs: {
1414
pname = "mistral-vibe";
15-
version = "2.4.2";
15+
version = "2.5.0";
1616
pyproject = true;
1717

1818
src = fetchFromGitHub {
1919
owner = "mistralai";
2020
repo = "mistral-vibe";
2121
tag = "v${finalAttrs.version}";
22-
hash = "sha256-r/9kMhkoLfj9oEifFun/bpIQYEouqm9YEiWZVk07+S8=";
22+
hash = "sha256-5su0Qfg3M+Yq4pkptDOJhvM8VFGCaOLeeDijeFeywP4=";
2323
};
2424

2525
build-system = with python3Packages; [
@@ -58,12 +58,14 @@ python3Packages.buildPythonApplication (finalAttrs: {
5858
pyyaml
5959
requests
6060
rich
61+
sounddevice
6162
textual
6263
textual-speedups
6364
tomli-w
6465
tree-sitter
6566
tree-sitter-bash
6667
watchfiles
68+
websockets
6769
zstandard
6870
];
6971

@@ -81,7 +83,29 @@ python3Packages.buildPythonApplication (finalAttrs: {
8183
];
8284
versionCheckKeepEnvironment = [ "HOME" ];
8385

84-
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
86+
disabledTests = [
87+
# Fail in the sandbox
88+
# vibe.core.audio_recorder.audio_recorder_port.NoAudioInputDeviceError: No audio input device available
89+
"test_audio_stream_yields_chunks"
90+
"test_auto_stops_after_max_duration"
91+
"test_buffer_mode_audio_stream_yields_nothing"
92+
"test_can_record_multiple_times"
93+
"test_cancel_discards_audio"
94+
"test_manual_stop_prevents_on_expire"
95+
"test_on_expire_receives_audio"
96+
"test_peak_clamps_to_one"
97+
"test_peak_updates_from_callback"
98+
"test_silent_audio_has_zero_peak"
99+
"test_start_sets_recording_state"
100+
"test_start_when_already_recording_raises"
101+
"test_stop_from_event_loop_does_not_block"
102+
"test_stop_returns_empty_data_in_stream_mode"
103+
"test_stop_returns_positive_duration"
104+
"test_stop_returns_valid_wav"
105+
"test_stop_without_drain_returns_promptly"
106+
"test_stream_audio_does_not_leak_into_buffer_recording"
107+
]
108+
++ lib.optionals stdenv.hostPlatform.isDarwin [
85109
# AssertionError
86110
"test_rebuilds_index_when_mass_change_threshold_is_exceeded"
87111
"test_updates_index_incrementally_by_default"
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
6+
# build-system
7+
pdm-backend,
8+
9+
# dependencies
10+
anyio,
11+
httpx,
12+
httpx-ws,
13+
msgspec,
14+
typing-extensions,
15+
16+
# tests
17+
pytest-asyncio,
18+
pytestCheckHook,
19+
}:
20+
21+
buildPythonPackage (finalAttrs: {
22+
pname = "lmstudio";
23+
version = "1.5.0";
24+
pyproject = true;
25+
26+
src = fetchFromGitHub {
27+
owner = "lmstudio-ai";
28+
repo = "lmstudio-python";
29+
tag = finalAttrs.version;
30+
hash = "sha256-3LOoCWoQ7eXRPXHRio9Rtle07HcV3ZrWkrtVVY6mvfI=";
31+
};
32+
33+
build-system = [
34+
pdm-backend
35+
];
36+
37+
dependencies = [
38+
anyio
39+
httpx
40+
httpx-ws
41+
msgspec
42+
typing-extensions
43+
];
44+
45+
pythonImportsCheck = [ "lmstudio" ];
46+
47+
nativeCheckInputs = [
48+
pytest-asyncio
49+
pytestCheckHook
50+
];
51+
52+
disabledTests = [
53+
# lmstudio.LMStudioRuntimeError: Local API host port is not yet resolved.
54+
"test_session_disconnected_async"
55+
];
56+
57+
disabledTestPaths = [
58+
# ModuleNotFoundError: No module named 'pytest_subtests'
59+
"tests/async/test_model_catalog_async.py"
60+
"tests/sync/test_model_catalog_sync.py"
61+
"tests/test_inference.py"
62+
63+
# lmstudio.LMStudioRuntimeError: Local API host port is not yet resolved.
64+
"tests/async/test_embedding_async.py"
65+
"tests/async/test_images_async.py"
66+
"tests/async/test_inference_async.py"
67+
"tests/async/test_llm_async.py"
68+
"tests/async/test_model_handles_async.py"
69+
"tests/async/test_repository_async.py"
70+
"tests/async/test_sdk_bypass_async.py"
71+
"tests/sync/test_embedding_sync.py"
72+
"tests/sync/test_images_sync.py"
73+
"tests/sync/test_inference_sync.py"
74+
"tests/sync/test_llm_sync.py"
75+
"tests/sync/test_model_handles_sync.py"
76+
"tests/sync/test_repository_sync.py"
77+
"tests/sync/test_sdk_bypass_sync.py"
78+
"tests/test_convenience_api.py"
79+
"tests/test_logging.py"
80+
"tests/test_plugin_examples.py"
81+
"tests/test_sessions.py"
82+
"tests/test_timeouts.py"
83+
];
84+
85+
__darwinAllowLocalNetworking = true;
86+
87+
meta = {
88+
description = "LM Studio Python SDK";
89+
homepage = "https://github.com/lmstudio-ai/lmstudio-python";
90+
changelog = "https://github.com/lmstudio-ai/lmstudio-python/releases/tag/${finalAttrs.src.tag}";
91+
license = lib.licenses.mit;
92+
maintainers = with lib.maintainers; [ GaetanLepage ];
93+
};
94+
})

pkgs/development/python-modules/mistralai/default.nix

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99
# dependencies
1010
eval-type-backport,
1111
httpx,
12-
invoke,
1312
opentelemetry-api,
14-
opentelemetry-exporter-otlp-proto-http,
15-
opentelemetry-sdk,
13+
opentelemetry-semantic-conventions,
1614
pydantic,
1715
python-dateutil,
18-
pyyaml,
1916
typing-inspection,
2017

2118
# optional-dependencies
@@ -26,19 +23,20 @@
2623
requests,
2724

2825
# tests
26+
opentelemetry-sdk,
2927
pytestCheckHook,
3028
}:
3129

3230
buildPythonPackage (finalAttrs: {
3331
pname = "mistralai";
34-
version = "1.12.3";
32+
version = "2.0.4";
3533
pyproject = true;
3634

3735
src = fetchFromGitHub {
3836
owner = "mistralai";
3937
repo = "client-python";
4038
tag = "v${finalAttrs.version}";
41-
hash = "sha256-DaCAO4/DoskFuRgNcoLWBuRdnxXfYhsgY/WZu/s1wk0=";
39+
hash = "sha256-SLPLj9rp8TTOSE3ldobBFU1+MpffzH1Bpshw+7LLUvU=";
4240
};
4341

4442
preBuild = ''
@@ -50,18 +48,15 @@ buildPythonPackage (finalAttrs: {
5048
];
5149

5250
pythonRelaxDeps = [
53-
"opentelemetry-exporter-otlp-proto-http"
51+
"opentelemetry-semantic-conventions"
5452
];
5553
dependencies = [
5654
eval-type-backport
5755
httpx
58-
invoke
5956
opentelemetry-api
60-
opentelemetry-exporter-otlp-proto-http
61-
opentelemetry-sdk
57+
opentelemetry-semantic-conventions
6258
pydantic
6359
python-dateutil
64-
pyyaml
6560
typing-inspection
6661
];
6762

@@ -80,7 +75,15 @@ buildPythonPackage (finalAttrs: {
8075
pythonImportsCheck = [ "mistralai" ];
8176

8277
nativeCheckInputs = [
78+
opentelemetry-sdk
8379
pytestCheckHook
80+
]
81+
++ finalAttrs.passthru.optional-dependencies.agents
82+
++ finalAttrs.passthru.optional-dependencies.gcp;
83+
84+
disabledTests = [
85+
# AssertionError: <Response [200 OK]> is not an instance of <class 'mistralai.extra.observability.otel.TracedResponse'>
86+
"TestOtelTracing"
8487
];
8588

8689
meta = {

0 commit comments

Comments
 (0)