lightning-sdk 2025.9.2__py3-none-any.whl → 2025.9.10__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 (49) 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/openapi/__init__.py +19 -0
  5. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +105 -0
  6. lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +101 -0
  7. lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +744 -13
  8. lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +4 -4
  9. lightning_sdk/lightning_cloud/openapi/models/__init__.py +19 -0
  10. lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +27 -1
  11. lightning_sdk/lightning_cloud/openapi/models/id_render_body.py +123 -0
  12. lightning_sdk/lightning_cloud/openapi/models/kubernetestemplates_id_body.py +227 -0
  13. lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
  14. lightning_sdk/lightning_cloud/openapi/models/models_model_id_body.py +109 -31
  15. lightning_sdk/lightning_cloud/openapi/models/models_model_id_body1.py +149 -0
  16. lightning_sdk/lightning_cloud/openapi/models/project_id_kubernetestemplates_body.py +227 -0
  17. lightning_sdk/lightning_cloud/openapi/models/v1_ai_pod_v1.py +53 -1
  18. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/v1_create_model_metrics_response.py +97 -0
  20. lightning_sdk/lightning_cloud/openapi/models/v1_delete_kubernetes_template_response.py +97 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_firewall_rule.py +175 -0
  22. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_required_balance_status_response.py +6 -6
  23. lightning_sdk/lightning_cloud/openapi/models/v1_get_temp_bucket_credentials_response.py +201 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_group_node_metrics.py +1215 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +565 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_incident_severity.py +105 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +105 -0
  28. lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_indexes.py +149 -0
  29. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_template.py +383 -0
  30. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_template_property.py +227 -0
  31. lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_events_response.py +123 -0
  32. lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_templates_response.py +123 -0
  33. lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_response.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/v1_node_metrics.py +81 -3
  36. lightning_sdk/lightning_cloud/openapi/models/v1_quote_annual_upsell_response.py +29 -3
  37. lightning_sdk/lightning_cloud/openapi/models/v1_render_kubernetes_template_response.py +123 -0
  38. lightning_sdk/lightning_cloud/openapi/models/v1_required_balance_reason.py +107 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_secret_type.py +1 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +154 -128
  41. lightning_sdk/llm/llm.py +82 -7
  42. lightning_sdk/llm/public_assistants.py +2 -2
  43. lightning_sdk/studio.py +30 -3
  44. {lightning_sdk-2025.9.2.dist-info → lightning_sdk-2025.9.10.dist-info}/METADATA +1 -1
  45. {lightning_sdk-2025.9.2.dist-info → lightning_sdk-2025.9.10.dist-info}/RECORD +49 -30
  46. {lightning_sdk-2025.9.2.dist-info → lightning_sdk-2025.9.10.dist-info}/entry_points.txt +1 -0
  47. {lightning_sdk-2025.9.2.dist-info → lightning_sdk-2025.9.10.dist-info}/LICENSE +0 -0
  48. {lightning_sdk-2025.9.2.dist-info → lightning_sdk-2025.9.10.dist-info}/WHEEL +0 -0
  49. {lightning_sdk-2025.9.2.dist-info → lightning_sdk-2025.9.10.dist-info}/top_level.txt +0 -0
@@ -68,15 +68,18 @@ class V1UserFeatures(object):
68
68
  'f234': 'bool',
69
69
  'f236': 'bool',
70
70
  'f237': 'bool',
71
- 'f238': 'bool',
72
71
  'f239': 'bool',
73
72
  'f240': 'bool',
74
73
  'f241': 'bool',
75
- 'f242': 'bool',
76
74
  'f243': 'bool',
77
75
  'f245': 'bool',
78
- 'f246': 'bool',
79
76
  'f247': 'bool',
77
+ 'f248': 'bool',
78
+ 'f249': 'bool',
79
+ 'f250': 'bool',
80
+ 'f251': 'bool',
81
+ 'f252': 'bool',
82
+ 'f253': 'bool',
80
83
  'fair_share': 'bool',
81
84
  'featured_studios_admin': 'bool',
82
85
  'gcp_overprovisioning': 'bool',
@@ -93,7 +96,6 @@ class V1UserFeatures(object):
93
96
  'model_api_dashboard': 'bool',
94
97
  'multiple_studio_versions': 'bool',
95
98
  'nerf_fs_nonpaying': 'bool',
96
- 'onboarding_v2': 'bool',
97
99
  'org_level_member_permissions': 'bool',
98
100
  'org_usage_limits': 'bool',
99
101
  'persistent_disk': 'bool',
@@ -121,7 +123,6 @@ class V1UserFeatures(object):
121
123
  'studio_sharing_v2': 'bool',
122
124
  'studio_version_visibility': 'bool',
123
125
  'trainium2': 'bool',
124
- 'use_rclone_mounts_only': 'bool',
125
126
  'vultr': 'bool',
126
127
  'weka': 'bool',
127
128
  'writable_s3_connections': 'bool'
@@ -155,15 +156,18 @@ class V1UserFeatures(object):
155
156
  'f234': 'f234',
156
157
  'f236': 'f236',
157
158
  'f237': 'f237',
158
- 'f238': 'f238',
159
159
  'f239': 'f239',
160
160
  'f240': 'f240',
161
161
  'f241': 'f241',
162
- 'f242': 'f242',
163
162
  'f243': 'f243',
164
163
  'f245': 'f245',
165
- 'f246': 'f246',
166
164
  'f247': 'f247',
165
+ 'f248': 'f248',
166
+ 'f249': 'f249',
167
+ 'f250': 'f250',
168
+ 'f251': 'f251',
169
+ 'f252': 'f252',
170
+ 'f253': 'f253',
167
171
  'fair_share': 'fairShare',
168
172
  'featured_studios_admin': 'featuredStudiosAdmin',
169
173
  'gcp_overprovisioning': 'gcpOverprovisioning',
@@ -180,7 +184,6 @@ class V1UserFeatures(object):
180
184
  'model_api_dashboard': 'modelApiDashboard',
181
185
  'multiple_studio_versions': 'multipleStudioVersions',
182
186
  'nerf_fs_nonpaying': 'nerfFsNonpaying',
183
- 'onboarding_v2': 'onboardingV2',
184
187
  'org_level_member_permissions': 'orgLevelMemberPermissions',
185
188
  'org_usage_limits': 'orgUsageLimits',
186
189
  'persistent_disk': 'persistentDisk',
@@ -208,13 +211,12 @@ class V1UserFeatures(object):
208
211
  'studio_sharing_v2': 'studioSharingV2',
209
212
  'studio_version_visibility': 'studioVersionVisibility',
210
213
  'trainium2': 'trainium2',
211
- 'use_rclone_mounts_only': 'useRcloneMountsOnly',
212
214
  'vultr': 'vultr',
213
215
  'weka': 'weka',
214
216
  'writable_s3_connections': 'writableS3Connections'
215
217
  }
216
218
 
217
- 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, f238: '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
218
220
  """V1UserFeatures - a model defined in Swagger""" # noqa: E501
219
221
  self._affiliate_links = None
220
222
  self._agents_v2 = None
@@ -243,15 +245,18 @@ class V1UserFeatures(object):
243
245
  self._f234 = None
244
246
  self._f236 = None
245
247
  self._f237 = None
246
- self._f238 = None
247
248
  self._f239 = None
248
249
  self._f240 = None
249
250
  self._f241 = None
250
- self._f242 = None
251
251
  self._f243 = None
252
252
  self._f245 = None
253
- self._f246 = None
254
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
255
260
  self._fair_share = None
256
261
  self._featured_studios_admin = None
257
262
  self._gcp_overprovisioning = None
@@ -268,7 +273,6 @@ class V1UserFeatures(object):
268
273
  self._model_api_dashboard = None
269
274
  self._multiple_studio_versions = None
270
275
  self._nerf_fs_nonpaying = None
271
- self._onboarding_v2 = None
272
276
  self._org_level_member_permissions = None
273
277
  self._org_usage_limits = None
274
278
  self._persistent_disk = None
@@ -296,7 +300,6 @@ class V1UserFeatures(object):
296
300
  self._studio_sharing_v2 = None
297
301
  self._studio_version_visibility = None
298
302
  self._trainium2 = None
299
- self._use_rclone_mounts_only = None
300
303
  self._vultr = None
301
304
  self._weka = None
302
305
  self._writable_s3_connections = None
@@ -355,24 +358,30 @@ class V1UserFeatures(object):
355
358
  self.f236 = f236
356
359
  if f237 is not None:
357
360
  self.f237 = f237
358
- if f238 is not None:
359
- self.f238 = f238
360
361
  if f239 is not None:
361
362
  self.f239 = f239
362
363
  if f240 is not None:
363
364
  self.f240 = f240
364
365
  if f241 is not None:
365
366
  self.f241 = f241
366
- if f242 is not None:
367
- self.f242 = f242
368
367
  if f243 is not None:
369
368
  self.f243 = f243
370
369
  if f245 is not None:
371
370
  self.f245 = f245
372
- if f246 is not None:
373
- self.f246 = f246
374
371
  if f247 is not None:
375
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
376
385
  if fair_share is not None:
377
386
  self.fair_share = fair_share
378
387
  if featured_studios_admin is not None:
@@ -405,8 +414,6 @@ class V1UserFeatures(object):
405
414
  self.multiple_studio_versions = multiple_studio_versions
406
415
  if nerf_fs_nonpaying is not None:
407
416
  self.nerf_fs_nonpaying = nerf_fs_nonpaying
408
- if onboarding_v2 is not None:
409
- self.onboarding_v2 = onboarding_v2
410
417
  if org_level_member_permissions is not None:
411
418
  self.org_level_member_permissions = org_level_member_permissions
412
419
  if org_usage_limits is not None:
@@ -461,8 +468,6 @@ class V1UserFeatures(object):
461
468
  self.studio_version_visibility = studio_version_visibility
462
469
  if trainium2 is not None:
463
470
  self.trainium2 = trainium2
464
- if use_rclone_mounts_only is not None:
465
- self.use_rclone_mounts_only = use_rclone_mounts_only
466
471
  if vultr is not None:
467
472
  self.vultr = vultr
468
473
  if weka is not None:
@@ -1037,27 +1042,6 @@ class V1UserFeatures(object):
1037
1042
 
1038
1043
  self._f237 = f237
1039
1044
 
1040
- @property
1041
- def f238(self) -> 'bool':
1042
- """Gets the f238 of this V1UserFeatures. # noqa: E501
1043
-
1044
-
1045
- :return: The f238 of this V1UserFeatures. # noqa: E501
1046
- :rtype: bool
1047
- """
1048
- return self._f238
1049
-
1050
- @f238.setter
1051
- def f238(self, f238: 'bool'):
1052
- """Sets the f238 of this V1UserFeatures.
1053
-
1054
-
1055
- :param f238: The f238 of this V1UserFeatures. # noqa: E501
1056
- :type: bool
1057
- """
1058
-
1059
- self._f238 = f238
1060
-
1061
1045
  @property
1062
1046
  def f239(self) -> 'bool':
1063
1047
  """Gets the f239 of this V1UserFeatures. # noqa: E501
@@ -1121,27 +1105,6 @@ class V1UserFeatures(object):
1121
1105
 
1122
1106
  self._f241 = f241
1123
1107
 
1124
- @property
1125
- def f242(self) -> 'bool':
1126
- """Gets the f242 of this V1UserFeatures. # noqa: E501
1127
-
1128
-
1129
- :return: The f242 of this V1UserFeatures. # noqa: E501
1130
- :rtype: bool
1131
- """
1132
- return self._f242
1133
-
1134
- @f242.setter
1135
- def f242(self, f242: 'bool'):
1136
- """Sets the f242 of this V1UserFeatures.
1137
-
1138
-
1139
- :param f242: The f242 of this V1UserFeatures. # noqa: E501
1140
- :type: bool
1141
- """
1142
-
1143
- self._f242 = f242
1144
-
1145
1108
  @property
1146
1109
  def f243(self) -> 'bool':
1147
1110
  """Gets the f243 of this V1UserFeatures. # noqa: E501
@@ -1185,46 +1148,151 @@ class V1UserFeatures(object):
1185
1148
  self._f245 = f245
1186
1149
 
1187
1150
  @property
1188
- def f246(self) -> 'bool':
1189
- """Gets the f246 of this V1UserFeatures. # noqa: E501
1151
+ def f247(self) -> 'bool':
1152
+ """Gets the f247 of this V1UserFeatures. # noqa: E501
1190
1153
 
1191
1154
 
1192
- :return: The f246 of this V1UserFeatures. # noqa: E501
1155
+ :return: The f247 of this V1UserFeatures. # noqa: E501
1193
1156
  :rtype: bool
1194
1157
  """
1195
- return self._f246
1158
+ return self._f247
1196
1159
 
1197
- @f246.setter
1198
- def f246(self, f246: 'bool'):
1199
- """Sets the f246 of this V1UserFeatures.
1160
+ @f247.setter
1161
+ def f247(self, f247: 'bool'):
1162
+ """Sets the f247 of this V1UserFeatures.
1200
1163
 
1201
1164
 
1202
- :param f246: The f246 of this V1UserFeatures. # noqa: E501
1165
+ :param f247: The f247 of this V1UserFeatures. # noqa: E501
1203
1166
  :type: bool
1204
1167
  """
1205
1168
 
1206
- self._f246 = f246
1169
+ self._f247 = f247
1207
1170
 
1208
1171
  @property
1209
- def f247(self) -> 'bool':
1210
- """Gets the f247 of this V1UserFeatures. # noqa: E501
1172
+ def f248(self) -> 'bool':
1173
+ """Gets the f248 of this V1UserFeatures. # noqa: E501
1211
1174
 
1212
1175
 
1213
- :return: The f247 of this V1UserFeatures. # noqa: E501
1176
+ :return: The f248 of this V1UserFeatures. # noqa: E501
1214
1177
  :rtype: bool
1215
1178
  """
1216
- return self._f247
1179
+ return self._f248
1217
1180
 
1218
- @f247.setter
1219
- def f247(self, f247: 'bool'):
1220
- """Sets the f247 of this V1UserFeatures.
1181
+ @f248.setter
1182
+ def f248(self, f248: 'bool'):
1183
+ """Sets the f248 of this V1UserFeatures.
1221
1184
 
1222
1185
 
1223
- :param f247: The f247 of this V1UserFeatures. # noqa: E501
1186
+ :param f248: The f248 of this V1UserFeatures. # noqa: E501
1224
1187
  :type: bool
1225
1188
  """
1226
1189
 
1227
- 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
1228
1296
 
1229
1297
  @property
1230
1298
  def fair_share(self) -> 'bool':
@@ -1562,27 +1630,6 @@ class V1UserFeatures(object):
1562
1630
 
1563
1631
  self._nerf_fs_nonpaying = nerf_fs_nonpaying
1564
1632
 
1565
- @property
1566
- def onboarding_v2(self) -> 'bool':
1567
- """Gets the onboarding_v2 of this V1UserFeatures. # noqa: E501
1568
-
1569
-
1570
- :return: The onboarding_v2 of this V1UserFeatures. # noqa: E501
1571
- :rtype: bool
1572
- """
1573
- return self._onboarding_v2
1574
-
1575
- @onboarding_v2.setter
1576
- def onboarding_v2(self, onboarding_v2: 'bool'):
1577
- """Sets the onboarding_v2 of this V1UserFeatures.
1578
-
1579
-
1580
- :param onboarding_v2: The onboarding_v2 of this V1UserFeatures. # noqa: E501
1581
- :type: bool
1582
- """
1583
-
1584
- self._onboarding_v2 = onboarding_v2
1585
-
1586
1633
  @property
1587
1634
  def org_level_member_permissions(self) -> 'bool':
1588
1635
  """Gets the org_level_member_permissions of this V1UserFeatures. # noqa: E501
@@ -2150,27 +2197,6 @@ class V1UserFeatures(object):
2150
2197
 
2151
2198
  self._trainium2 = trainium2
2152
2199
 
2153
- @property
2154
- def use_rclone_mounts_only(self) -> 'bool':
2155
- """Gets the use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
2156
-
2157
-
2158
- :return: The use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
2159
- :rtype: bool
2160
- """
2161
- return self._use_rclone_mounts_only
2162
-
2163
- @use_rclone_mounts_only.setter
2164
- def use_rclone_mounts_only(self, use_rclone_mounts_only: 'bool'):
2165
- """Sets the use_rclone_mounts_only of this V1UserFeatures.
2166
-
2167
-
2168
- :param use_rclone_mounts_only: The use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
2169
- :type: bool
2170
- """
2171
-
2172
- self._use_rclone_mounts_only = use_rclone_mounts_only
2173
-
2174
2200
  @property
2175
2201
  def vultr(self) -> 'bool':
2176
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,49 @@ 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
+ self._metadata = ModelMetadata(
121
+ name=self._model_name,
122
+ provider=self._model_provider,
123
+ status=model.status,
124
+ context_length=int(model.context_length),
125
+ max_completion_tokens=int(model.max_completion_tokens) if model.max_completion_tokens != "0" else None,
126
+ prompt_price=model.prompt_token_price,
127
+ completion_price=model.completion_token_price,
128
+ capabilities={
129
+ "images": model.abilities.can_receive_images,
130
+ "files": model.abilities.can_receive_files,
131
+ "hub_deployment": model.abilities.can_call_hub_deployment,
132
+ },
133
+ throughput=model.throughput,
134
+ time_to_first_token=model.time_to_first_token,
135
+ )
136
+ return self._metadata
85
137
 
138
+ @property
139
+ def context_length(self) -> Optional[int]:
140
+ """Context length for the current model."""
141
+ if self._context_length is None:
142
+ try:
143
+ self._context_length = self.metadata.context_length
144
+ except Exception as e:
145
+ raise ValueError(f"Cannot access context length: {e}") from e
146
+ return self._context_length
147
+
148
+ def get_context_length(self, model: Optional[str] = None) -> Optional[int]:
149
+ """Get context length for the given model."""
86
150
  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}'.")
151
+ if context_info and "context_length" in context_info:
152
+ return int(context_info["context_length"])
89
153
 
90
- return int(context_info["context_length"])
154
+ try:
155
+ temp_metadata = self._llm_api.get_model_metadata(self._teamspace_id, model)
156
+ return int(temp_metadata.context_length)
157
+ except Exception as e:
158
+ raise ValueError(f"Cannot access context length of model '{model}': {e}") from e
91
159
 
92
160
  def _get_auth_info(self, teamspace_owner: Optional[str] = None, teamspace_name: Optional[str] = None) -> None:
93
161
  if not LLM._auth_info_cached:
@@ -291,6 +359,7 @@ class LLM:
291
359
  metadata: Optional[Dict[str, str]] = None,
292
360
  stream: bool = False,
293
361
  full_response: bool = False,
362
+ reasoning_effort: Optional[Literal["low", "medium", "highc"]] = None,
294
363
  **kwargs: Any,
295
364
  ) -> Union[str, AsyncGenerator[str, None]]:
296
365
  conversation_id = self._conversations.get(conversation) if conversation else None
@@ -326,10 +395,14 @@ class LLM:
326
395
  stream: bool = False,
327
396
  full_response: bool = False,
328
397
  tools: Optional[List[Dict[str, Any]]] = None,
398
+ reasoning_effort: Optional[Literal["low", "medium", "high"]] = None,
329
399
  **kwargs: Any,
330
400
  ) -> Union[
331
401
  V1ConversationResponseChunk, Generator[V1ConversationResponseChunk, None, None], str, Generator[str, None, None]
332
402
  ]:
403
+ if reasoning_effort is not None and reasoning_effort not in ["low", "medium", "high"]:
404
+ raise ValueError("reasoning_effort must be 'low', 'medium', 'high', or None")
405
+
333
406
  if conversation and conversation not in self._conversations:
334
407
  self._get_conversations()
335
408
 
@@ -352,6 +425,7 @@ class LLM:
352
425
  metadata,
353
426
  stream,
354
427
  full_response,
428
+ reasoning_effort,
355
429
  **kwargs,
356
430
  )
357
431
 
@@ -367,6 +441,7 @@ class LLM:
367
441
  name=conversation,
368
442
  stream=stream,
369
443
  tools=tools,
444
+ reasoning_effort=reasoning_effort,
370
445
  **kwargs,
371
446
  )
372
447
  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",