mindroot 9.14.0__py3-none-any.whl → 9.16.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.

@@ -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
- print(f"Error getting v2 preferences: {e}")
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,18 +9,19 @@ 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():
26
27
  print("Preferences v2 file not found. Creating from template.")
@@ -31,8 +32,8 @@ class ModelPreferencesV2:
31
32
  # Create minimal default if template doesn't exist
32
33
  default_prefs = {
33
34
  "stream_chat": [
34
- ["ah_anthropic", "claude-sonnet-4-0"]
35
35
  ["ah_openrouter", "deepseek/deepseek-chat-v3.1"],
36
+ ["ah_anthropic", "claude-sonnet-4-0"],
36
37
  ["mr_gemini", "models/gemini-2.5-pro"],
37
38
  ["ah_openai", "gpt-5"]
38
39
  ],
@@ -42,9 +43,11 @@ class ModelPreferencesV2:
42
43
  }
43
44
  print("Template preferences v2 file not found. Creating minimal default preferences.")
44
45
  self.save_preferences(default_prefs)
46
+ print("File saved to data/preferred_models_v2.json")
45
47
 
46
48
  def get_preferences(self) -> Dict[str, List[List[str]]]:
47
49
  """Get preferences in new format: {service: [[provider, model], ...]}"""
50
+ print("Getting preferences v2...")
48
51
  self.ensure_preferences_exist()
49
52
 
50
53
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mindroot
3
- Version: 9.14.0
3
+ Version: 9.16.0
4
4
  Summary: MindRoot AI Agent Framework
5
5
  Requires-Python: >=3.9
6
6
  License-File: LICENSE
@@ -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=C3zhQuumSvoZXkhsCsQ3H0B3AARtyRLXBo8aiArwWsk,8794
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
@@ -2252,7 +2252,7 @@ mindroot/lib/providers/__init__.py,sha256=CxqC9iaRUTx6q2i4rfLAjGEmjy7t6d86SoyTYC
2252
2252
  mindroot/lib/providers/commands.py,sha256=wxR9tfwjdu7lbjJZQ1vNOWH-vEdhcpOxkaBf2G9OKv0,735
2253
2253
  mindroot/lib/providers/hooks.py,sha256=9cJoJRhZyzFmLBJNTYGaVijA7B6hAm2mJu9I2ij4WMo,359
2254
2254
  mindroot/lib/providers/missing.py,sha256=G6ZM25ZEVgsk4uWwgf0GygJ1SWEnstwfw7xsR9QEI_E,2457
2255
- mindroot/lib/providers/model_preferences_v2.py,sha256=MNIdPyU4CbX3IWYsdnBgpppHkqMwGYjPn5grpMhkaZQ,7120
2255
+ mindroot/lib/providers/model_preferences_v2.py,sha256=DesJZCPFkbC6-3EqguTMVCfxJbcOi7gMWl01s1CinJs,7337
2256
2256
  mindroot/lib/providers/services.py,sha256=nTPUbz_KjxAENg4s9ymZnztH4Z7dhBjM6bvSlIxMQQs,598
2257
2257
  mindroot/lib/providers/backup/__init__.py,sha256=8iL9fylkE7SaFap4oj9D2eikN_4EJp5IaANiPF75qWM,12186
2258
2258
  mindroot/lib/utils/backoff.py,sha256=P059hqyTtYM_unNQP_iHSdYNhWe3Hz6VqbJ_vX19eoI,5520
@@ -2268,9 +2268,9 @@ mindroot/protocols/services/stream_chat.py,sha256=fMnPfwaB5fdNMBLTEg8BXKAGvrELKH
2268
2268
  mindroot/registry/__init__.py,sha256=40Xy9bmPHsgdIrOzbtBGzf4XMqXVi9P8oZTJhn0r654,151
2269
2269
  mindroot/registry/component_manager.py,sha256=WZFNPg4SNvpqsM5NFiC2DpgmrJQCyR9cNhrCBpp30Qk,995
2270
2270
  mindroot/registry/data_access.py,sha256=81In5TwETpaqnnY1_-tBQM7rfWvUxZUZkG7lEelRUfU,5321
2271
- mindroot-9.14.0.dist-info/licenses/LICENSE,sha256=8plAmZh8y9ccuuqFFz4kp7G-cO_qsPgAOoHNvabSB4U,1070
2272
- mindroot-9.14.0.dist-info/METADATA,sha256=vQJX8HG4MvNZxgiXolxPccpDgbSya8sZMCAscM-n9jE,1035
2273
- mindroot-9.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
2274
- mindroot-9.14.0.dist-info/entry_points.txt,sha256=0bpyjMccLttx6VcjDp6zfJPN0Kk0rffor6IdIbP0j4c,50
2275
- mindroot-9.14.0.dist-info/top_level.txt,sha256=gwKm7DmNjhdrCJTYCrxa9Szne4lLpCtrEBltfsX-Mm8,9
2276
- mindroot-9.14.0.dist-info/RECORD,,
2271
+ mindroot-9.16.0.dist-info/licenses/LICENSE,sha256=8plAmZh8y9ccuuqFFz4kp7G-cO_qsPgAOoHNvabSB4U,1070
2272
+ mindroot-9.16.0.dist-info/METADATA,sha256=RMTIxcIM4hbJGVLnDcDVC885gol-Xr75w3a2XSJAE5A,1035
2273
+ mindroot-9.16.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
2274
+ mindroot-9.16.0.dist-info/entry_points.txt,sha256=0bpyjMccLttx6VcjDp6zfJPN0Kk0rffor6IdIbP0j4c,50
2275
+ mindroot-9.16.0.dist-info/top_level.txt,sha256=gwKm7DmNjhdrCJTYCrxa9Szne4lLpCtrEBltfsX-Mm8,9
2276
+ mindroot-9.16.0.dist-info/RECORD,,