lightning-sdk 2025.9.4__py3-none-any.whl → 2025.9.11__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.
Files changed (43) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/llm_api.py +19 -0
  3. lightning_sdk/api/studio_api.py +25 -4
  4. lightning_sdk/lightning_cloud/login.py +60 -0
  5. lightning_sdk/lightning_cloud/openapi/__init__.py +17 -0
  6. lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +744 -13
  7. lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py +105 -0
  8. lightning_sdk/lightning_cloud/openapi/models/__init__.py +17 -0
  9. lightning_sdk/lightning_cloud/openapi/models/id_render_body.py +123 -0
  10. lightning_sdk/lightning_cloud/openapi/models/kubernetestemplates_id_body.py +227 -0
  11. lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
  12. lightning_sdk/lightning_cloud/openapi/models/project_id_kubernetestemplates_body.py +227 -0
  13. lightning_sdk/lightning_cloud/openapi/models/project_tab_management_messages.py +123 -0
  14. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  15. lightning_sdk/lightning_cloud/openapi/models/v1_ai_pod_v1.py +53 -1
  16. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  17. lightning_sdk/lightning_cloud/openapi/models/v1_delete_kubernetes_template_response.py +97 -0
  18. lightning_sdk/lightning_cloud/openapi/models/v1_firewall_rule.py +175 -0
  19. lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +565 -0
  20. lightning_sdk/lightning_cloud/openapi/models/v1_incident_severity.py +105 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +106 -0
  22. lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_indexes.py +149 -0
  23. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_template.py +383 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_template_property.py +227 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_events_response.py +123 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_templates_response.py +123 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
  29. lightning_sdk/lightning_cloud/openapi/models/v1_project_tab.py +149 -0
  30. lightning_sdk/lightning_cloud/openapi/models/v1_quote_annual_upsell_response.py +29 -3
  31. lightning_sdk/lightning_cloud/openapi/models/v1_render_kubernetes_template_response.py +123 -0
  32. lightning_sdk/lightning_cloud/openapi/models/v1_secret_type.py +1 -0
  33. lightning_sdk/lightning_cloud/openapi/models/v1_update_project_tab_order_response.py +123 -0
  34. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +154 -102
  35. lightning_sdk/llm/llm.py +91 -7
  36. lightning_sdk/llm/public_assistants.py +2 -2
  37. lightning_sdk/studio.py +30 -3
  38. {lightning_sdk-2025.9.4.dist-info → lightning_sdk-2025.9.11.dist-info}/METADATA +1 -1
  39. {lightning_sdk-2025.9.4.dist-info → lightning_sdk-2025.9.11.dist-info}/RECORD +43 -26
  40. {lightning_sdk-2025.9.4.dist-info → lightning_sdk-2025.9.11.dist-info}/entry_points.txt +1 -0
  41. {lightning_sdk-2025.9.4.dist-info → lightning_sdk-2025.9.11.dist-info}/LICENSE +0 -0
  42. {lightning_sdk-2025.9.4.dist-info → lightning_sdk-2025.9.11.dist-info}/WHEEL +0 -0
  43. {lightning_sdk-2025.9.4.dist-info → lightning_sdk-2025.9.11.dist-info}/top_level.txt +0 -0
@@ -71,11 +71,15 @@ class V1UserFeatures(object):
71
71
  'f239': 'bool',
72
72
  'f240': 'bool',
73
73
  'f241': 'bool',
74
- 'f242': 'bool',
75
74
  'f243': 'bool',
76
75
  'f245': 'bool',
77
- 'f246': 'bool',
78
76
  'f247': 'bool',
77
+ 'f248': 'bool',
78
+ 'f249': 'bool',
79
+ 'f250': 'bool',
80
+ 'f251': 'bool',
81
+ 'f252': 'bool',
82
+ 'f253': 'bool',
79
83
  'fair_share': 'bool',
80
84
  'featured_studios_admin': 'bool',
81
85
  'gcp_overprovisioning': 'bool',
@@ -92,7 +96,6 @@ class V1UserFeatures(object):
92
96
  'model_api_dashboard': 'bool',
93
97
  'multiple_studio_versions': 'bool',
94
98
  'nerf_fs_nonpaying': 'bool',
95
- 'onboarding_v2': 'bool',
96
99
  'org_level_member_permissions': 'bool',
97
100
  'org_usage_limits': 'bool',
98
101
  'persistent_disk': 'bool',
@@ -120,7 +123,6 @@ class V1UserFeatures(object):
120
123
  'studio_sharing_v2': 'bool',
121
124
  'studio_version_visibility': 'bool',
122
125
  'trainium2': 'bool',
123
- 'use_rclone_mounts_only': 'bool',
124
126
  'vultr': 'bool',
125
127
  'weka': 'bool',
126
128
  'writable_s3_connections': 'bool'
@@ -157,11 +159,15 @@ class V1UserFeatures(object):
157
159
  'f239': 'f239',
158
160
  'f240': 'f240',
159
161
  'f241': 'f241',
160
- 'f242': 'f242',
161
162
  'f243': 'f243',
162
163
  'f245': 'f245',
163
- 'f246': 'f246',
164
164
  'f247': 'f247',
165
+ 'f248': 'f248',
166
+ 'f249': 'f249',
167
+ 'f250': 'f250',
168
+ 'f251': 'f251',
169
+ 'f252': 'f252',
170
+ 'f253': 'f253',
165
171
  'fair_share': 'fairShare',
166
172
  'featured_studios_admin': 'featuredStudiosAdmin',
167
173
  'gcp_overprovisioning': 'gcpOverprovisioning',
@@ -178,7 +184,6 @@ class V1UserFeatures(object):
178
184
  'model_api_dashboard': 'modelApiDashboard',
179
185
  'multiple_studio_versions': 'multipleStudioVersions',
180
186
  'nerf_fs_nonpaying': 'nerfFsNonpaying',
181
- 'onboarding_v2': 'onboardingV2',
182
187
  'org_level_member_permissions': 'orgLevelMemberPermissions',
183
188
  'org_usage_limits': 'orgUsageLimits',
184
189
  'persistent_disk': 'persistentDisk',
@@ -206,13 +211,12 @@ class V1UserFeatures(object):
206
211
  'studio_sharing_v2': 'studioSharingV2',
207
212
  'studio_version_visibility': 'studioVersionVisibility',
208
213
  'trainium2': 'trainium2',
209
- 'use_rclone_mounts_only': 'useRcloneMountsOnly',
210
214
  'vultr': 'vultr',
211
215
  'weka': 'weka',
212
216
  'writable_s3_connections': 'writableS3Connections'
213
217
  }
214
218
 
215
- def __init__(self, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f227: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f237: 'bool' =None, f239: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f242: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f246: 'bool' =None, f247: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcp_overprovisioning: 'bool' =None, gcs_connections_optimized: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, model_api_dashboard: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, onboarding_v2: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, single_wallet: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_sharing_v2: 'bool' =None, studio_version_visibility: 'bool' =None, trainium2: 'bool' =None, use_rclone_mounts_only: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
219
+ def __init__(self, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f227: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f237: 'bool' =None, f239: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f248: 'bool' =None, f249: 'bool' =None, f250: 'bool' =None, f251: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcp_overprovisioning: 'bool' =None, gcs_connections_optimized: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, model_api_dashboard: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, single_wallet: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_sharing_v2: 'bool' =None, studio_version_visibility: 'bool' =None, trainium2: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
216
220
  """V1UserFeatures - a model defined in Swagger""" # noqa: E501
217
221
  self._affiliate_links = None
218
222
  self._agents_v2 = None
@@ -244,11 +248,15 @@ class V1UserFeatures(object):
244
248
  self._f239 = None
245
249
  self._f240 = None
246
250
  self._f241 = None
247
- self._f242 = None
248
251
  self._f243 = None
249
252
  self._f245 = None
250
- self._f246 = None
251
253
  self._f247 = None
254
+ self._f248 = None
255
+ self._f249 = None
256
+ self._f250 = None
257
+ self._f251 = None
258
+ self._f252 = None
259
+ self._f253 = None
252
260
  self._fair_share = None
253
261
  self._featured_studios_admin = None
254
262
  self._gcp_overprovisioning = None
@@ -265,7 +273,6 @@ class V1UserFeatures(object):
265
273
  self._model_api_dashboard = None
266
274
  self._multiple_studio_versions = None
267
275
  self._nerf_fs_nonpaying = None
268
- self._onboarding_v2 = None
269
276
  self._org_level_member_permissions = None
270
277
  self._org_usage_limits = None
271
278
  self._persistent_disk = None
@@ -293,7 +300,6 @@ class V1UserFeatures(object):
293
300
  self._studio_sharing_v2 = None
294
301
  self._studio_version_visibility = None
295
302
  self._trainium2 = None
296
- self._use_rclone_mounts_only = None
297
303
  self._vultr = None
298
304
  self._weka = None
299
305
  self._writable_s3_connections = None
@@ -358,16 +364,24 @@ class V1UserFeatures(object):
358
364
  self.f240 = f240
359
365
  if f241 is not None:
360
366
  self.f241 = f241
361
- if f242 is not None:
362
- self.f242 = f242
363
367
  if f243 is not None:
364
368
  self.f243 = f243
365
369
  if f245 is not None:
366
370
  self.f245 = f245
367
- if f246 is not None:
368
- self.f246 = f246
369
371
  if f247 is not None:
370
372
  self.f247 = f247
373
+ if f248 is not None:
374
+ self.f248 = f248
375
+ if f249 is not None:
376
+ self.f249 = f249
377
+ if f250 is not None:
378
+ self.f250 = f250
379
+ if f251 is not None:
380
+ self.f251 = f251
381
+ if f252 is not None:
382
+ self.f252 = f252
383
+ if f253 is not None:
384
+ self.f253 = f253
371
385
  if fair_share is not None:
372
386
  self.fair_share = fair_share
373
387
  if featured_studios_admin is not None:
@@ -400,8 +414,6 @@ class V1UserFeatures(object):
400
414
  self.multiple_studio_versions = multiple_studio_versions
401
415
  if nerf_fs_nonpaying is not None:
402
416
  self.nerf_fs_nonpaying = nerf_fs_nonpaying
403
- if onboarding_v2 is not None:
404
- self.onboarding_v2 = onboarding_v2
405
417
  if org_level_member_permissions is not None:
406
418
  self.org_level_member_permissions = org_level_member_permissions
407
419
  if org_usage_limits is not None:
@@ -456,8 +468,6 @@ class V1UserFeatures(object):
456
468
  self.studio_version_visibility = studio_version_visibility
457
469
  if trainium2 is not None:
458
470
  self.trainium2 = trainium2
459
- if use_rclone_mounts_only is not None:
460
- self.use_rclone_mounts_only = use_rclone_mounts_only
461
471
  if vultr is not None:
462
472
  self.vultr = vultr
463
473
  if weka is not None:
@@ -1095,27 +1105,6 @@ class V1UserFeatures(object):
1095
1105
 
1096
1106
  self._f241 = f241
1097
1107
 
1098
- @property
1099
- def f242(self) -> 'bool':
1100
- """Gets the f242 of this V1UserFeatures. # noqa: E501
1101
-
1102
-
1103
- :return: The f242 of this V1UserFeatures. # noqa: E501
1104
- :rtype: bool
1105
- """
1106
- return self._f242
1107
-
1108
- @f242.setter
1109
- def f242(self, f242: 'bool'):
1110
- """Sets the f242 of this V1UserFeatures.
1111
-
1112
-
1113
- :param f242: The f242 of this V1UserFeatures. # noqa: E501
1114
- :type: bool
1115
- """
1116
-
1117
- self._f242 = f242
1118
-
1119
1108
  @property
1120
1109
  def f243(self) -> 'bool':
1121
1110
  """Gets the f243 of this V1UserFeatures. # noqa: E501
@@ -1159,46 +1148,151 @@ class V1UserFeatures(object):
1159
1148
  self._f245 = f245
1160
1149
 
1161
1150
  @property
1162
- def f246(self) -> 'bool':
1163
- """Gets the f246 of this V1UserFeatures. # noqa: E501
1151
+ def f247(self) -> 'bool':
1152
+ """Gets the f247 of this V1UserFeatures. # noqa: E501
1164
1153
 
1165
1154
 
1166
- :return: The f246 of this V1UserFeatures. # noqa: E501
1155
+ :return: The f247 of this V1UserFeatures. # noqa: E501
1167
1156
  :rtype: bool
1168
1157
  """
1169
- return self._f246
1158
+ return self._f247
1170
1159
 
1171
- @f246.setter
1172
- def f246(self, f246: 'bool'):
1173
- """Sets the f246 of this V1UserFeatures.
1160
+ @f247.setter
1161
+ def f247(self, f247: 'bool'):
1162
+ """Sets the f247 of this V1UserFeatures.
1174
1163
 
1175
1164
 
1176
- :param f246: The f246 of this V1UserFeatures. # noqa: E501
1165
+ :param f247: The f247 of this V1UserFeatures. # noqa: E501
1177
1166
  :type: bool
1178
1167
  """
1179
1168
 
1180
- self._f246 = f246
1169
+ self._f247 = f247
1181
1170
 
1182
1171
  @property
1183
- def f247(self) -> 'bool':
1184
- """Gets the f247 of this V1UserFeatures. # noqa: E501
1172
+ def f248(self) -> 'bool':
1173
+ """Gets the f248 of this V1UserFeatures. # noqa: E501
1185
1174
 
1186
1175
 
1187
- :return: The f247 of this V1UserFeatures. # noqa: E501
1176
+ :return: The f248 of this V1UserFeatures. # noqa: E501
1188
1177
  :rtype: bool
1189
1178
  """
1190
- return self._f247
1179
+ return self._f248
1191
1180
 
1192
- @f247.setter
1193
- def f247(self, f247: 'bool'):
1194
- """Sets the f247 of this V1UserFeatures.
1181
+ @f248.setter
1182
+ def f248(self, f248: 'bool'):
1183
+ """Sets the f248 of this V1UserFeatures.
1195
1184
 
1196
1185
 
1197
- :param f247: The f247 of this V1UserFeatures. # noqa: E501
1186
+ :param f248: The f248 of this V1UserFeatures. # noqa: E501
1198
1187
  :type: bool
1199
1188
  """
1200
1189
 
1201
- self._f247 = f247
1190
+ self._f248 = f248
1191
+
1192
+ @property
1193
+ def f249(self) -> 'bool':
1194
+ """Gets the f249 of this V1UserFeatures. # noqa: E501
1195
+
1196
+
1197
+ :return: The f249 of this V1UserFeatures. # noqa: E501
1198
+ :rtype: bool
1199
+ """
1200
+ return self._f249
1201
+
1202
+ @f249.setter
1203
+ def f249(self, f249: 'bool'):
1204
+ """Sets the f249 of this V1UserFeatures.
1205
+
1206
+
1207
+ :param f249: The f249 of this V1UserFeatures. # noqa: E501
1208
+ :type: bool
1209
+ """
1210
+
1211
+ self._f249 = f249
1212
+
1213
+ @property
1214
+ def f250(self) -> 'bool':
1215
+ """Gets the f250 of this V1UserFeatures. # noqa: E501
1216
+
1217
+
1218
+ :return: The f250 of this V1UserFeatures. # noqa: E501
1219
+ :rtype: bool
1220
+ """
1221
+ return self._f250
1222
+
1223
+ @f250.setter
1224
+ def f250(self, f250: 'bool'):
1225
+ """Sets the f250 of this V1UserFeatures.
1226
+
1227
+
1228
+ :param f250: The f250 of this V1UserFeatures. # noqa: E501
1229
+ :type: bool
1230
+ """
1231
+
1232
+ self._f250 = f250
1233
+
1234
+ @property
1235
+ def f251(self) -> 'bool':
1236
+ """Gets the f251 of this V1UserFeatures. # noqa: E501
1237
+
1238
+
1239
+ :return: The f251 of this V1UserFeatures. # noqa: E501
1240
+ :rtype: bool
1241
+ """
1242
+ return self._f251
1243
+
1244
+ @f251.setter
1245
+ def f251(self, f251: 'bool'):
1246
+ """Sets the f251 of this V1UserFeatures.
1247
+
1248
+
1249
+ :param f251: The f251 of this V1UserFeatures. # noqa: E501
1250
+ :type: bool
1251
+ """
1252
+
1253
+ self._f251 = f251
1254
+
1255
+ @property
1256
+ def f252(self) -> 'bool':
1257
+ """Gets the f252 of this V1UserFeatures. # noqa: E501
1258
+
1259
+
1260
+ :return: The f252 of this V1UserFeatures. # noqa: E501
1261
+ :rtype: bool
1262
+ """
1263
+ return self._f252
1264
+
1265
+ @f252.setter
1266
+ def f252(self, f252: 'bool'):
1267
+ """Sets the f252 of this V1UserFeatures.
1268
+
1269
+
1270
+ :param f252: The f252 of this V1UserFeatures. # noqa: E501
1271
+ :type: bool
1272
+ """
1273
+
1274
+ self._f252 = f252
1275
+
1276
+ @property
1277
+ def f253(self) -> 'bool':
1278
+ """Gets the f253 of this V1UserFeatures. # noqa: E501
1279
+
1280
+
1281
+ :return: The f253 of this V1UserFeatures. # noqa: E501
1282
+ :rtype: bool
1283
+ """
1284
+ return self._f253
1285
+
1286
+ @f253.setter
1287
+ def f253(self, f253: 'bool'):
1288
+ """Sets the f253 of this V1UserFeatures.
1289
+
1290
+
1291
+ :param f253: The f253 of this V1UserFeatures. # noqa: E501
1292
+ :type: bool
1293
+ """
1294
+
1295
+ self._f253 = f253
1202
1296
 
1203
1297
  @property
1204
1298
  def fair_share(self) -> 'bool':
@@ -1536,27 +1630,6 @@ class V1UserFeatures(object):
1536
1630
 
1537
1631
  self._nerf_fs_nonpaying = nerf_fs_nonpaying
1538
1632
 
1539
- @property
1540
- def onboarding_v2(self) -> 'bool':
1541
- """Gets the onboarding_v2 of this V1UserFeatures. # noqa: E501
1542
-
1543
-
1544
- :return: The onboarding_v2 of this V1UserFeatures. # noqa: E501
1545
- :rtype: bool
1546
- """
1547
- return self._onboarding_v2
1548
-
1549
- @onboarding_v2.setter
1550
- def onboarding_v2(self, onboarding_v2: 'bool'):
1551
- """Sets the onboarding_v2 of this V1UserFeatures.
1552
-
1553
-
1554
- :param onboarding_v2: The onboarding_v2 of this V1UserFeatures. # noqa: E501
1555
- :type: bool
1556
- """
1557
-
1558
- self._onboarding_v2 = onboarding_v2
1559
-
1560
1633
  @property
1561
1634
  def org_level_member_permissions(self) -> 'bool':
1562
1635
  """Gets the org_level_member_permissions of this V1UserFeatures. # noqa: E501
@@ -2124,27 +2197,6 @@ class V1UserFeatures(object):
2124
2197
 
2125
2198
  self._trainium2 = trainium2
2126
2199
 
2127
- @property
2128
- def use_rclone_mounts_only(self) -> 'bool':
2129
- """Gets the use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
2130
-
2131
-
2132
- :return: The use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
2133
- :rtype: bool
2134
- """
2135
- return self._use_rclone_mounts_only
2136
-
2137
- @use_rclone_mounts_only.setter
2138
- def use_rclone_mounts_only(self, use_rclone_mounts_only: 'bool'):
2139
- """Sets the use_rclone_mounts_only of this V1UserFeatures.
2140
-
2141
-
2142
- :param use_rclone_mounts_only: The use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
2143
- :type: bool
2144
- """
2145
-
2146
- self._use_rclone_mounts_only = use_rclone_mounts_only
2147
-
2148
2200
  @property
2149
2201
  def vultr(self) -> 'bool':
2150
2202
  """Gets the vultr of this V1UserFeatures. # noqa: E501
lightning_sdk/llm/llm.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import os
2
- from typing import Any, AsyncGenerator, ClassVar, Dict, Generator, List, Optional, Tuple, Union
2
+ from dataclasses import dataclass
3
+ from typing import Any, AsyncGenerator, ClassVar, Dict, Generator, List, Literal, Optional, Tuple, Union
3
4
 
4
5
  from lightning_sdk.api import TeamspaceApi, UserApi
5
6
  from lightning_sdk.api.llm_api import LLMApi, authenticate
@@ -15,6 +16,38 @@ PUBLIC_MODEL_PROVIDERS: Dict[str, str] = {
15
16
  }
16
17
 
17
18
 
19
+ @dataclass
20
+ class ModelMetadata:
21
+ name: str
22
+ provider: str
23
+ status: str
24
+ context_length: int
25
+ max_completion_tokens: Optional[int]
26
+ prompt_price: float
27
+ completion_price: float
28
+ capabilities: Dict[str, bool]
29
+ throughput: float
30
+ time_to_first_token: float
31
+
32
+ def __str__(self) -> str:
33
+ """Return a user-friendly string representation of the model metadata.
34
+
35
+ Returns:
36
+ str: A formatted multi-line string containing model information including
37
+ name, provider, status, context length, pricing, performance metrics,
38
+ and key capabilities (images and files support).
39
+ """
40
+ return f"""
41
+ Model: {self.name}
42
+ Provider: {self.provider}
43
+ Status: {self.status}
44
+ Context Length: {self.context_length:,} tokens
45
+ Pricing: ${self.prompt_price:.2e}/prompt token, ${self.completion_price:.2e}/completion token
46
+ Performance: {self.throughput:.1f} tokens/sec, {self.time_to_first_token:.1f}ms TTFT
47
+ Capabilities: Images={self.capabilities.get('images', False)}, Files={self.capabilities.get('files', False)}
48
+ """.strip()
49
+
50
+
18
51
  class LLM:
19
52
  _auth_info_cached: ClassVar[bool] = False
20
53
  _cached_auth_info: ClassVar[Dict[str, Optional[str]]] = {}
@@ -70,6 +103,7 @@ class LLM:
70
103
  self._context_length = None
71
104
  self._model_id = self._get_model_id()
72
105
  self._conversations = {}
106
+ self._metadata = None
73
107
 
74
108
  @property
75
109
  def name(self) -> str:
@@ -79,15 +113,58 @@ class LLM:
79
113
  def provider(self) -> str:
80
114
  return self._model_provider
81
115
 
82
- def context_length(self, model: Optional[str] = None) -> Optional[int]:
83
- if model is None:
84
- return self._context_length
116
+ @property
117
+ def metadata(self) -> ModelMetadata:
118
+ if self._metadata is None:
119
+ model = self._llm_api.get_model_metadata(self._teamspace_id, self._model_name)
120
+ abilities = (
121
+ model.abilities
122
+ or type(
123
+ "obj",
124
+ (object,),
125
+ {"can_receive_images": False, "can_receive_files": False, "can_call_hub_deployment": False},
126
+ )()
127
+ )
128
+
129
+ self._metadata = ModelMetadata(
130
+ name=self._model_name,
131
+ provider=self._model_provider,
132
+ status=model.status,
133
+ context_length=int(model.context_length),
134
+ max_completion_tokens=int(model.max_completion_tokens) if model.max_completion_tokens != "0" else None,
135
+ prompt_price=model.prompt_token_price,
136
+ completion_price=model.completion_token_price,
137
+ capabilities={
138
+ "images": abilities.can_receive_images,
139
+ "files": abilities.can_receive_files,
140
+ "hub_deployment": abilities.can_call_hub_deployment,
141
+ },
142
+ throughput=model.throughput,
143
+ time_to_first_token=model.time_to_first_token,
144
+ )
145
+ return self._metadata
85
146
 
147
+ @property
148
+ def context_length(self) -> Optional[int]:
149
+ """Context length for the current model."""
150
+ if self._context_length is None:
151
+ try:
152
+ self._context_length = self.metadata.context_length
153
+ except Exception as e:
154
+ raise ValueError(f"Cannot access context length: {e}") from e
155
+ return self._context_length
156
+
157
+ def get_context_length(self, model: Optional[str] = None) -> Optional[int]:
158
+ """Get context length for the given model."""
86
159
  context_info = self._public_assistants.get(model)
87
- if context_info is None or "context_length" not in context_info:
88
- raise ValueError(f"Cannot access context length of model '{model}'.")
160
+ if context_info and "context_length" in context_info:
161
+ return int(context_info["context_length"])
89
162
 
90
- return int(context_info["context_length"])
163
+ try:
164
+ temp_metadata = self._llm_api.get_model_metadata(self._teamspace_id, model)
165
+ return int(temp_metadata.context_length)
166
+ except Exception as e:
167
+ raise ValueError(f"Cannot access context length of model '{model}': {e}") from e
91
168
 
92
169
  def _get_auth_info(self, teamspace_owner: Optional[str] = None, teamspace_name: Optional[str] = None) -> None:
93
170
  if not LLM._auth_info_cached:
@@ -291,6 +368,7 @@ class LLM:
291
368
  metadata: Optional[Dict[str, str]] = None,
292
369
  stream: bool = False,
293
370
  full_response: bool = False,
371
+ reasoning_effort: Optional[Literal["low", "medium", "highc"]] = None,
294
372
  **kwargs: Any,
295
373
  ) -> Union[str, AsyncGenerator[str, None]]:
296
374
  conversation_id = self._conversations.get(conversation) if conversation else None
@@ -326,10 +404,14 @@ class LLM:
326
404
  stream: bool = False,
327
405
  full_response: bool = False,
328
406
  tools: Optional[List[Dict[str, Any]]] = None,
407
+ reasoning_effort: Optional[Literal["low", "medium", "high"]] = None,
329
408
  **kwargs: Any,
330
409
  ) -> Union[
331
410
  V1ConversationResponseChunk, Generator[V1ConversationResponseChunk, None, None], str, Generator[str, None, None]
332
411
  ]:
412
+ if reasoning_effort is not None and reasoning_effort not in ["low", "medium", "high"]:
413
+ raise ValueError("reasoning_effort must be 'low', 'medium', 'high', or None")
414
+
333
415
  if conversation and conversation not in self._conversations:
334
416
  self._get_conversations()
335
417
 
@@ -352,6 +434,7 @@ class LLM:
352
434
  metadata,
353
435
  stream,
354
436
  full_response,
437
+ reasoning_effort,
355
438
  **kwargs,
356
439
  )
357
440
 
@@ -367,6 +450,7 @@ class LLM:
367
450
  name=conversation,
368
451
  stream=stream,
369
452
  tools=tools,
453
+ reasoning_effort=reasoning_effort,
370
454
  **kwargs,
371
455
  )
372
456
  if not stream:
@@ -21,11 +21,11 @@ PUBLIC_MODELS = {
21
21
  },
22
22
  "google/gemini-2.5-flash": {
23
23
  "id": "ast_01jz3thxskg4fcdk4xhkjkym5a",
24
- "context_length": 8000
24
+ "context_length": 1048576
25
25
  },
26
26
  "google/gemini-2.5-flash-lite-preview-06-17": {
27
27
  "id": "ast_01jz3thxskg4fcdk4xhkjkym5b",
28
- "context_length": 8000
28
+ "context_length": 1048576
29
29
  },
30
30
  "lightning-ai/DeepSeek-V3.1": {
31
31
  "id": "ast_01k378z15k0msktaxjpfrfwqqh",
lightning_sdk/studio.py CHANGED
@@ -9,6 +9,7 @@ from tqdm.auto import tqdm
9
9
  from lightning_sdk.api.cloud_account_api import CloudAccountApi
10
10
  from lightning_sdk.api.studio_api import StudioApi
11
11
  from lightning_sdk.constants import _LIGHTNING_DEBUG
12
+ from lightning_sdk.lightning_cloud.openapi import V1ClusterType
12
13
  from lightning_sdk.machine import CloudProvider, Machine
13
14
  from lightning_sdk.organization import Organization
14
15
  from lightning_sdk.owner import Owner
@@ -344,12 +345,15 @@ class Studio:
344
345
  )
345
346
  return Studio(**kwargs)
346
347
 
347
- def switch_machine(self, machine: Union[Machine, str], interruptible: bool = False) -> None:
348
+ def switch_machine(
349
+ self, machine: Union[Machine, str], interruptible: bool = False, cloud_provider: Optional[CloudProvider] = None
350
+ ) -> None:
348
351
  """Switches machine to the provided machine type/.
349
352
 
350
353
  Args:
351
354
  machine: the new machine type to switch to
352
355
  interruptible: determines whether to switch to an interruptible instance
356
+ cloud_provider: the cloud provider to switch to, has no effect if the Studio is not on Lightning Cloud
353
357
 
354
358
  Note:
355
359
  this call is blocking until the new machine is provisioned
@@ -361,6 +365,20 @@ class Studio:
361
365
  f"Cannot switch machine on a studio that is not running. Studio {self.name} is {status}."
362
366
  )
363
367
 
368
+ current_cloud = self._cloud_account_api.get_cloud_account_non_org(
369
+ self._teamspace.id,
370
+ self._studio.cluster_id,
371
+ )
372
+
373
+ cloud_account = ""
374
+ if cloud_provider is not None and current_cloud.spec.cluster_type == V1ClusterType.GLOBAL:
375
+ cloud_account = self._cloud_account_api.resolve_cloud_account(
376
+ self._teamspace.id,
377
+ cloud_account=None,
378
+ cloud_provider=cloud_provider,
379
+ default_cloud_account=None,
380
+ )
381
+
364
382
  if self.show_progress:
365
383
  from lightning_sdk.utils.progress import StudioProgressTracker
366
384
 
@@ -370,13 +388,22 @@ class Studio:
370
388
 
371
389
  # Start the switch operation with progress tracking
372
390
  self._studio_api.switch_studio_machine_with_progress(
373
- self._studio.id, self._teamspace.id, machine, interruptible=interruptible, progress=progress
391
+ self._studio.id,
392
+ self._teamspace.id,
393
+ machine,
394
+ interruptible=interruptible,
395
+ progress=progress,
396
+ cloud_account=cloud_account,
374
397
  )
375
398
  else:
376
399
  self._studio_api.switch_studio_machine(
377
- self._studio.id, self._teamspace.id, machine, interruptible=interruptible
400
+ self._studio.id, self._teamspace.id, machine, interruptible=interruptible, cloud_account=cloud_account
378
401
  )
379
402
 
403
+ if self._studio and cloud_account:
404
+ # TODO: get this from the API
405
+ self._studio.cluster_id = cloud_account
406
+
380
407
  def run_and_detach(self, *commands: str, timeout: float = 10, check_interval: float = 1) -> str:
381
408
  """Runs given commands on the Studio and returns immediately.
382
409
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lightning_sdk
3
- Version: 2025.9.4
3
+ Version: 2025.9.11
4
4
  Summary: SDK to develop using Lightning AI Studios
5
5
  Author-email: Lightning-AI <justus@lightning.ai>
6
6
  License: MIT License