mindroot 9.13.0__py3-none-any.whl → 9.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mindroot might be problematic. Click here for more details.
- mindroot/coreplugins/admin/settings_router.py +7 -1
- mindroot/lib/providers/model_preferences_v2.py +10 -4
- {mindroot-9.13.0.dist-info → mindroot-9.15.0.dist-info}/METADATA +1 -1
- {mindroot-9.13.0.dist-info → mindroot-9.15.0.dist-info}/RECORD +8 -9
- mindroot/coreplugins/agent/preferred_models.default.json +0 -12
- {mindroot-9.13.0.dist-info → mindroot-9.15.0.dist-info}/WHEEL +0 -0
- {mindroot-9.13.0.dist-info → mindroot-9.15.0.dist-info}/entry_points.txt +0 -0
- {mindroot-9.13.0.dist-info → mindroot-9.15.0.dist-info}/licenses/LICENSE +0 -0
- {mindroot-9.13.0.dist-info → mindroot-9.15.0.dist-info}/top_level.txt +0 -0
|
@@ -3,6 +3,8 @@ from pydantic import BaseModel
|
|
|
3
3
|
from typing import List, Dict
|
|
4
4
|
import json
|
|
5
5
|
import os
|
|
6
|
+
import sys
|
|
7
|
+
import traceback
|
|
6
8
|
from lib.providers.commands import command, command_manager
|
|
7
9
|
from lib.providers import services
|
|
8
10
|
from lib.providers.commands import command_manager
|
|
@@ -178,7 +180,11 @@ async def get_settings_v2():
|
|
|
178
180
|
prefs_manager = ModelPreferencesV2()
|
|
179
181
|
return prefs_manager.get_preferences()
|
|
180
182
|
except Exception as e:
|
|
181
|
-
|
|
183
|
+
trace = traceback.format_exc()
|
|
184
|
+
print(f"Error getting v2 preferences: {e}\n\n{trace}")
|
|
185
|
+
print(e)
|
|
186
|
+
print(trace)
|
|
187
|
+
sys.exit(1)
|
|
182
188
|
raise HTTPException(status_code=500, detail=str(e))
|
|
183
189
|
|
|
184
190
|
@router.post('/settings_v2')
|
|
@@ -9,28 +9,31 @@ class ModelPreferencesV2:
|
|
|
9
9
|
|
|
10
10
|
def __init__(self):
|
|
11
11
|
# Use current working directory for data (supports multiple installations)
|
|
12
|
+
print("Hello from Model preferences V2!")
|
|
12
13
|
self.data_dir = Path.cwd() / 'data'
|
|
13
14
|
self.preferences_file = self.data_dir / 'preferred_models_v2.json'
|
|
14
15
|
|
|
15
16
|
# Locate template file relative to this script's location
|
|
16
17
|
script_dir = Path(__file__)
|
|
17
|
-
self.template_file = script_dir / 'default_preferred_models.json'
|
|
18
|
+
self.template_file = script_dir.parent / 'default_preferred_models.json'
|
|
18
19
|
|
|
19
20
|
def ensure_preferences_exist(self) -> None:
|
|
20
21
|
"""Copy template preferences file to data directory if it doesn't exist."""
|
|
21
22
|
# Ensure data directory exists
|
|
22
23
|
self.data_dir.mkdir(exist_ok=True)
|
|
23
|
-
|
|
24
|
+
print("Ensuring preferences v2 file exists...")
|
|
24
25
|
# If preferences file doesn't exist, copy from template
|
|
25
26
|
if not self.preferences_file.exists():
|
|
27
|
+
print("Preferences v2 file not found. Creating from template.")
|
|
26
28
|
if self.template_file.exists():
|
|
29
|
+
print("Copying template preferences v2 file to location data/preferred_models_v2.json")
|
|
27
30
|
shutil.copy2(self.template_file, self.preferences_file)
|
|
28
31
|
else:
|
|
29
32
|
# Create minimal default if template doesn't exist
|
|
30
33
|
default_prefs = {
|
|
31
34
|
"stream_chat": [
|
|
32
|
-
["ah_anthropic", "claude-sonnet-4-0"]
|
|
33
|
-
[
|
|
35
|
+
["ah_anthropic", "claude-sonnet-4-0"],
|
|
36
|
+
["ah_openrouter", "deepseek/deepseek-chat-v3.1"],
|
|
34
37
|
["mr_gemini", "models/gemini-2.5-pro"],
|
|
35
38
|
["ah_openai", "gpt-5"]
|
|
36
39
|
],
|
|
@@ -38,10 +41,13 @@ class ModelPreferencesV2:
|
|
|
38
41
|
["ah_flux", "flux-dev"]
|
|
39
42
|
]
|
|
40
43
|
}
|
|
44
|
+
print("Template preferences v2 file not found. Creating minimal default preferences.")
|
|
41
45
|
self.save_preferences(default_prefs)
|
|
46
|
+
print("File saved to data/preferred_models_v2.json")
|
|
42
47
|
|
|
43
48
|
def get_preferences(self) -> Dict[str, List[List[str]]]:
|
|
44
49
|
"""Get preferences in new format: {service: [[provider, model], ...]}"""
|
|
50
|
+
print("Getting preferences v2...")
|
|
45
51
|
self.ensure_preferences_exist()
|
|
46
52
|
|
|
47
53
|
try:
|
|
@@ -26,7 +26,7 @@ mindroot/coreplugins/admin/registry_settings_routes.py,sha256=x739599dkE_A5uM1qQ
|
|
|
26
26
|
mindroot/coreplugins/admin/router.py,sha256=MuGRPO-v8B7QkbnOOjiRvmzrXzDS-xFtHyjj_qzJfQ0,5923
|
|
27
27
|
mindroot/coreplugins/admin/server_router.py,sha256=aZ5v7QBcK1LJ2yiciUA4elY26iSGl-8m03L1h3ogvP4,4533
|
|
28
28
|
mindroot/coreplugins/admin/service_models.py,sha256=53Whq4X1Ci3D4FuzG_Eyrmz66LxnyQek-mOYw38qQm8,3355
|
|
29
|
-
mindroot/coreplugins/admin/settings_router.py,sha256=
|
|
29
|
+
mindroot/coreplugins/admin/settings_router.py,sha256=YNcIuzxbLo9upA6AuJ6QSGKFvnnLC_mvX7daiKJ_CZM,8930
|
|
30
30
|
mindroot/coreplugins/admin/static/logo.png,sha256=YejLvBHILjTPkOBYE2t37BD8sTtXbPmLh1Zo-x8pbok,18260
|
|
31
31
|
mindroot/coreplugins/admin/static/css/admin-custom.css,sha256=GZ2gxqyhzdjm1KBOQpiYl18YOOW39aoPN3Akb9gDgYU,14404
|
|
32
32
|
mindroot/coreplugins/admin/static/css/dark.css,sha256=wOODR6WTWKhx0Cq8GDpY9THWwVC4LJBLc68PpYKIPzA,15597
|
|
@@ -447,7 +447,6 @@ mindroot/coreplugins/agent/equivalent_flags.default.json,sha256=2U-3S-gIRTDd4g6i
|
|
|
447
447
|
mindroot/coreplugins/agent/escaping.md,sha256=b6VdJjQ3oYhLStV-72wzHm7DhQDnnJp5gKJFkTB-Geo,2798
|
|
448
448
|
mindroot/coreplugins/agent/init_models.py,sha256=-o5P3NNlWmgbGltngfq5VYZ9Dm81N9kkMqTkG4p5PDA,939
|
|
449
449
|
mindroot/coreplugins/agent/models.default.json,sha256=hX9-dlBWzJ-2QpMeG696hk7c483-CivujIcRRq4DcNs,1146
|
|
450
|
-
mindroot/coreplugins/agent/preferred_models.default.json,sha256=Zpi6psgjhY750vyRfxN54LJM9N3afq83aL9HvmsquuU,276
|
|
451
450
|
mindroot/coreplugins/agent/providers.default.json,sha256=FPmY5qVOrBy_Z4RgDJWQwLwxd-zWWI83nnAE6z5fEeg,1524
|
|
452
451
|
mindroot/coreplugins/agent/system.j2.backup,sha256=itPx-urDBtKBqwps5T6yly4M9gX45AdrM-sznwefG_U,8927
|
|
453
452
|
mindroot/coreplugins/agent/Assistant/agent.json,sha256=P4CaQpQaUTwx0PoyV9bCJHvfvANsFyBZlNcMtVlxM3M,1281
|
|
@@ -2253,7 +2252,7 @@ mindroot/lib/providers/__init__.py,sha256=CxqC9iaRUTx6q2i4rfLAjGEmjy7t6d86SoyTYC
|
|
|
2253
2252
|
mindroot/lib/providers/commands.py,sha256=wxR9tfwjdu7lbjJZQ1vNOWH-vEdhcpOxkaBf2G9OKv0,735
|
|
2254
2253
|
mindroot/lib/providers/hooks.py,sha256=9cJoJRhZyzFmLBJNTYGaVijA7B6hAm2mJu9I2ij4WMo,359
|
|
2255
2254
|
mindroot/lib/providers/missing.py,sha256=G6ZM25ZEVgsk4uWwgf0GygJ1SWEnstwfw7xsR9QEI_E,2457
|
|
2256
|
-
mindroot/lib/providers/model_preferences_v2.py,sha256=
|
|
2255
|
+
mindroot/lib/providers/model_preferences_v2.py,sha256=M0F9lq000LxShfN_RoPG50Hh-I0NzcrfdcSpD6IS48I,7337
|
|
2257
2256
|
mindroot/lib/providers/services.py,sha256=nTPUbz_KjxAENg4s9ymZnztH4Z7dhBjM6bvSlIxMQQs,598
|
|
2258
2257
|
mindroot/lib/providers/backup/__init__.py,sha256=8iL9fylkE7SaFap4oj9D2eikN_4EJp5IaANiPF75qWM,12186
|
|
2259
2258
|
mindroot/lib/utils/backoff.py,sha256=P059hqyTtYM_unNQP_iHSdYNhWe3Hz6VqbJ_vX19eoI,5520
|
|
@@ -2269,9 +2268,9 @@ mindroot/protocols/services/stream_chat.py,sha256=fMnPfwaB5fdNMBLTEg8BXKAGvrELKH
|
|
|
2269
2268
|
mindroot/registry/__init__.py,sha256=40Xy9bmPHsgdIrOzbtBGzf4XMqXVi9P8oZTJhn0r654,151
|
|
2270
2269
|
mindroot/registry/component_manager.py,sha256=WZFNPg4SNvpqsM5NFiC2DpgmrJQCyR9cNhrCBpp30Qk,995
|
|
2271
2270
|
mindroot/registry/data_access.py,sha256=81In5TwETpaqnnY1_-tBQM7rfWvUxZUZkG7lEelRUfU,5321
|
|
2272
|
-
mindroot-9.
|
|
2273
|
-
mindroot-9.
|
|
2274
|
-
mindroot-9.
|
|
2275
|
-
mindroot-9.
|
|
2276
|
-
mindroot-9.
|
|
2277
|
-
mindroot-9.
|
|
2271
|
+
mindroot-9.15.0.dist-info/licenses/LICENSE,sha256=8plAmZh8y9ccuuqFFz4kp7G-cO_qsPgAOoHNvabSB4U,1070
|
|
2272
|
+
mindroot-9.15.0.dist-info/METADATA,sha256=qnfftDCaMJ7Mj0SeFTBE4LITnnwn9_ALxpdgF2OtSaE,1035
|
|
2273
|
+
mindroot-9.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
2274
|
+
mindroot-9.15.0.dist-info/entry_points.txt,sha256=0bpyjMccLttx6VcjDp6zfJPN0Kk0rffor6IdIbP0j4c,50
|
|
2275
|
+
mindroot-9.15.0.dist-info/top_level.txt,sha256=gwKm7DmNjhdrCJTYCrxa9Szne4lLpCtrEBltfsX-Mm8,9
|
|
2276
|
+
mindroot-9.15.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|