codemie-sdk-python 0.1.717__tar.gz → 0.1.719__tar.gz

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 (93) hide show
  1. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/PKG-INFO +8 -1
  2. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/README.md +7 -0
  3. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/pyproject.toml +1 -1
  4. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/__init__.py +8 -0
  5. codemie_sdk_python-0.1.719/src/codemie_sdk/models/admin.py +196 -0
  6. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/analytics.py +77 -1
  7. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/assistant.py +17 -0
  8. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/conversation.py +1 -0
  9. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/integration.py +20 -0
  10. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/llm.py +23 -1
  11. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/workflow.py +1 -0
  12. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/workflow_execution_payload.py +4 -0
  13. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/admin.py +92 -0
  14. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/analytics.py +79 -2
  15. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/assistant.py +3 -0
  16. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/conversation.py +6 -1
  17. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/integration.py +45 -0
  18. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/llm.py +11 -2
  19. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/workflow.py +3 -0
  20. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/workflow_execution.py +4 -1
  21. codemie_sdk_python-0.1.717/src/codemie_sdk/models/admin.py +0 -98
  22. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/auth/__init__.py +0 -0
  23. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/auth/credentials.py +0 -0
  24. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/builders/__init__.py +0 -0
  25. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/builders/workflow/__init__.py +0 -0
  26. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/builders/workflow/builder.py +0 -0
  27. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/builders/workflow/definition.py +0 -0
  28. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/builders/workflow/publish.py +0 -0
  29. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/client/__init__.py +0 -0
  30. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/client/client.py +0 -0
  31. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/exceptions.py +0 -0
  32. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/__init__.py +0 -0
  33. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/a2a.py +0 -0
  34. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/activity_event.py +0 -0
  35. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/categories.py +0 -0
  36. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/common.py +0 -0
  37. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/cost_center.py +0 -0
  38. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/datasource.py +0 -0
  39. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/errors.py +0 -0
  40. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/file_operation.py +0 -0
  41. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/guardrails.py +0 -0
  42. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/hosted_application.py +0 -0
  43. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/marketplace_management.py +0 -0
  44. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/mcp_config.py +0 -0
  45. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/mermaid.py +0 -0
  46. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/project.py +0 -0
  47. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/provisioning.py +0 -0
  48. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/skill.py +0 -0
  49. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/task.py +0 -0
  50. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/usage_attribution.py +0 -0
  51. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/user.py +0 -0
  52. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/vendor_assistant.py +0 -0
  53. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/vendor_guardrail.py +0 -0
  54. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/vendor_knowledgebase.py +0 -0
  55. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/vendor_runtime.py +0 -0
  56. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/vendor_workflow.py +0 -0
  57. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/workflow_state.py +0 -0
  58. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/workflow_thoughts.py +0 -0
  59. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/workflow_transition.py +0 -0
  60. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/models/workspace.py +0 -0
  61. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/a2a.py +0 -0
  62. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/activity_event.py +0 -0
  63. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/budgets.py +0 -0
  64. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/categories.py +0 -0
  65. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/codemie_guardrails.py +0 -0
  66. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/cost_center.py +0 -0
  67. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/customer_config_service.py +0 -0
  68. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/datasource.py +0 -0
  69. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/dynamic_config.py +0 -0
  70. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/export.py +0 -0
  71. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/files.py +0 -0
  72. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/hosted_application.py +0 -0
  73. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/marketplace_management.py +0 -0
  74. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/mcp_configs.py +0 -0
  75. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/mermaid.py +0 -0
  76. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/project.py +0 -0
  77. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/project_budget_groups.py +0 -0
  78. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/provisioning.py +0 -0
  79. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/skill.py +0 -0
  80. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/task.py +0 -0
  81. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/usage_attribution.py +0 -0
  82. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/user.py +0 -0
  83. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/vendor_assistant.py +0 -0
  84. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/vendor_guardrail.py +0 -0
  85. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/vendor_knowledgebase.py +0 -0
  86. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/vendor_runtime.py +0 -0
  87. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/vendor_workflow.py +0 -0
  88. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/webhook.py +0 -0
  89. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/workflow_execution_state.py +0 -0
  90. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/services/workspace.py +0 -0
  91. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/utils/__init__.py +0 -0
  92. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/utils/http.py +0 -0
  93. {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.719}/src/codemie_sdk/utils/payload.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codemie-sdk-python
3
- Version: 0.1.717
3
+ Version: 0.1.719
4
4
  Summary: CodeMie SDK for Python
5
5
  License: Apache-2.0
6
6
  Author: CodeMie
@@ -123,6 +123,9 @@ Each LLM model contains:
123
123
  # List available LLM models
124
124
  llm_models = client.llms.list()
125
125
 
126
+ # Include all models, not only the default set
127
+ all_llm_models = client.llms.list(include_all=True)
128
+
126
129
  # List available embedding models
127
130
  embedding_models = client.llms.list_embeddings()
128
131
  ```
@@ -280,6 +283,10 @@ prebuilt_assistant = client.assistants.get_prebuilt_by_slug("assistant-slug")
280
283
  tools = client.assistants.get_tools()
281
284
  ```
282
285
 
286
+ #### Disabled Context Tools
287
+
288
+ `disabled_context_tools` (list of default datasource tool names opted out, e.g. `["search_kb"]`) is available on assistant create/update requests and on `Assistant` / `AssistantVersion` responses (defaults to `[]`). Omit it on update to leave the current value unchanged; pass `[]` to clear it.
289
+
283
290
  #### Prompt Variables Support
284
291
 
285
292
  The SDK supports assistant-level prompt variables that the backend already exposes via the `prompt_variables` field.
@@ -102,6 +102,9 @@ Each LLM model contains:
102
102
  # List available LLM models
103
103
  llm_models = client.llms.list()
104
104
 
105
+ # Include all models, not only the default set
106
+ all_llm_models = client.llms.list(include_all=True)
107
+
105
108
  # List available embedding models
106
109
  embedding_models = client.llms.list_embeddings()
107
110
  ```
@@ -259,6 +262,10 @@ prebuilt_assistant = client.assistants.get_prebuilt_by_slug("assistant-slug")
259
262
  tools = client.assistants.get_tools()
260
263
  ```
261
264
 
265
+ #### Disabled Context Tools
266
+
267
+ `disabled_context_tools` (list of default datasource tool names opted out, e.g. `["search_kb"]`) is available on assistant create/update requests and on `Assistant` / `AssistantVersion` responses (defaults to `[]`). Omit it on update to leave the current value unchanged; pass `[]` to clear it.
268
+
262
269
  #### Prompt Variables Support
263
270
 
264
271
  The SDK supports assistant-level prompt variables that the backend already exposes via the `prompt_variables` field.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "codemie-sdk-python"
3
- version = "0.1.717"
3
+ version = "0.1.719"
4
4
  description = "CodeMie SDK for Python"
5
5
  authors = ["CodeMie"]
6
6
  license = "Apache-2.0"
@@ -93,6 +93,7 @@ from .models.analytics import (
93
93
  SummariesResponse,
94
94
  TabularResponse,
95
95
  UsersListResponse,
96
+ AnalyticsDetailResponse,
96
97
  AnalyticsQueryParams,
97
98
  PaginatedAnalyticsQueryParams,
98
99
  CliAnalyticsQueryParams,
@@ -102,6 +103,7 @@ from .models.analytics import (
102
103
  CliAnalyticsSessionsResponse,
103
104
  CliAnalyticsSessionDetailResponse,
104
105
  CliAnalyticsRepositoriesResponse,
106
+ CliInsightsUserDetailQueryParams,
105
107
  )
106
108
  from .services.customer_config_service import CustomerConfigService
107
109
  from .services.vendor_assistant import VendorAssistantService
@@ -162,6 +164,8 @@ from .models.assistant import (
162
164
  BuiltinSubagent,
163
165
  )
164
166
  from .models.integration import (
167
+ IntegrationListPagination,
168
+ PaginatedIntegrationResponse,
165
169
  TransferMode,
166
170
  TransferItem,
167
171
  TransferSettingsResponse,
@@ -323,6 +327,7 @@ __all__ = [
323
327
  "SummariesResponse",
324
328
  "TabularResponse",
325
329
  "UsersListResponse",
330
+ "AnalyticsDetailResponse",
326
331
  "AnalyticsQueryParams",
327
332
  "PaginatedAnalyticsQueryParams",
328
333
  "CliAnalyticsQueryParams",
@@ -332,6 +337,7 @@ __all__ = [
332
337
  "CliAnalyticsSessionsResponse",
333
338
  "CliAnalyticsSessionDetailResponse",
334
339
  "CliAnalyticsRepositoriesResponse",
340
+ "CliInsightsUserDetailQueryParams",
335
341
  "AnalyticsService",
336
342
  "CustomerConfigService",
337
343
  "MermaidDiagramRequest",
@@ -361,6 +367,8 @@ __all__ = [
361
367
  "SkillPagination",
362
368
  "SkillService",
363
369
  "BuiltinSubagent",
370
+ "IntegrationListPagination",
371
+ "PaginatedIntegrationResponse",
364
372
  "TransferMode",
365
373
  "TransferItem",
366
374
  "TransferSettingsResponse",
@@ -0,0 +1,196 @@
1
+ """Admin models for managing applications/projects."""
2
+
3
+ from datetime import datetime
4
+
5
+ from pydantic import BaseModel, ConfigDict, Field
6
+
7
+ from .llm import ModelStatus, ModelStatusValue
8
+
9
+
10
+ class ApplicationInfo(BaseModel):
11
+ """Single application entry returned by GET /v1/admin/applications."""
12
+
13
+ model_config = ConfigDict(extra="ignore")
14
+
15
+ name: str
16
+ display_name: str | None = None
17
+
18
+
19
+ class ApplicationsListResponse(BaseModel):
20
+ """Response model for list applications endpoint."""
21
+
22
+ model_config = ConfigDict(extra="ignore")
23
+
24
+ applications: list[ApplicationInfo] = Field(
25
+ ..., description="List of application info objects"
26
+ )
27
+
28
+
29
+ class ApplicationCreateRequest(BaseModel):
30
+ """Request model for creating an application/project."""
31
+
32
+ model_config = ConfigDict(extra="ignore")
33
+
34
+ name: str = Field(..., description="Application/project name")
35
+
36
+
37
+ class ApplicationCreateResponse(BaseModel):
38
+ """Response model for create application endpoint."""
39
+
40
+ model_config = ConfigDict(extra="ignore")
41
+
42
+ message: str = Field(..., description="Created application name")
43
+
44
+
45
+ class LocalUserCreateRequest(BaseModel):
46
+ """Request model for admin user creation (local auth mode only)."""
47
+
48
+ model_config = ConfigDict(extra="ignore")
49
+
50
+ email: str
51
+ username: str
52
+ password: str
53
+ name: str | None = None
54
+ is_admin: bool = False
55
+ is_maintainer: bool = False
56
+
57
+
58
+ class LocalUserDetail(BaseModel):
59
+ """Response model for created/fetched user (local auth mode)."""
60
+
61
+ model_config = ConfigDict(extra="ignore")
62
+
63
+ id: str
64
+ email: str
65
+ username: str
66
+
67
+
68
+ class AdminUserListItem(BaseModel):
69
+ """User item returned by the admin list-users endpoint."""
70
+
71
+ model_config = ConfigDict(extra="ignore")
72
+
73
+ id: str
74
+ email: str
75
+ username: str
76
+
77
+
78
+ class AdminUserListPagination(BaseModel):
79
+ """Pagination metadata from GET /v1/admin/users."""
80
+
81
+ model_config = ConfigDict(extra="ignore")
82
+
83
+ total: int
84
+ page: int
85
+ per_page: int
86
+
87
+
88
+ class AdminUserListResponse(BaseModel):
89
+ """Paginated response from GET /v1/admin/users."""
90
+
91
+ model_config = ConfigDict(extra="ignore")
92
+
93
+ data: list[AdminUserListItem]
94
+ pagination: AdminUserListPagination
95
+
96
+ @property
97
+ def users(self) -> list[AdminUserListItem]:
98
+ return self.data
99
+
100
+ @property
101
+ def total(self) -> int:
102
+ return self.pagination.total
103
+
104
+
105
+ class AdminModelCost(BaseModel):
106
+ """Per-token cost of a model in the admin catalog."""
107
+
108
+ model_config = ConfigDict(extra="ignore")
109
+
110
+ input: float
111
+ output: float
112
+
113
+
114
+ class AdminLLMModel(BaseModel):
115
+ """Model entry returned by GET /v1/admin/llm/status."""
116
+
117
+ model_config = ConfigDict(extra="ignore")
118
+
119
+ base_name: str
120
+ label: str
121
+ model_type: str = Field(description="chat, embedding or audio_transcription")
122
+ enabled: bool
123
+ status: ModelStatusValue
124
+ provider: str | None = None
125
+ router_type: str | None = Field(
126
+ default=None,
127
+ description="Set for routers; their status is computed and cannot be changed",
128
+ )
129
+ is_premium: bool | None = None
130
+ multimodal: bool | None = None
131
+ supports_tools: bool | None = None
132
+ supports_image_generation: bool = False
133
+ cost: AdminModelCost | None = None
134
+ updated_by_name: str | None = None
135
+ updated_at: datetime | None = None
136
+
137
+
138
+ class LLMModelStatusUpdate(BaseModel):
139
+ """Result of setting the status of one model."""
140
+
141
+ model_config = ConfigDict(extra="ignore")
142
+
143
+ base_name: str
144
+ status: ModelStatusValue
145
+
146
+
147
+ class LLMModelStatusBulkItem(BaseModel):
148
+ """One requested status change in a bulk update."""
149
+
150
+ model_config = ConfigDict(extra="ignore", use_enum_values=True)
151
+
152
+ base_name: str
153
+ status: ModelStatus
154
+
155
+
156
+ class LLMModelStatusBulkItemResult(BaseModel):
157
+ """Outcome of one item of a bulk status update."""
158
+
159
+ model_config = ConfigDict(extra="ignore")
160
+
161
+ base_name: str
162
+ status: ModelStatusValue
163
+ success: bool
164
+ error: str | None = None
165
+
166
+
167
+ class LLMModelStatusBulkResult(BaseModel):
168
+ """Summary of a bulk status update; every item is processed independently."""
169
+
170
+ model_config = ConfigDict(extra="ignore")
171
+
172
+ total: int
173
+ succeeded: int
174
+ failed: int
175
+ results: list[LLMModelStatusBulkItemResult] = Field(default_factory=list)
176
+
177
+
178
+ class GlobalDefaultLLMModel(BaseModel):
179
+ """Global default model as returned by /v1/admin/llm/default."""
180
+
181
+ model_config = ConfigDict(extra="ignore")
182
+
183
+ saved_base_name: str | None = Field(
184
+ default=None, description="The model an administrator saved, if any"
185
+ )
186
+ updated_by_id: str | None = None
187
+ updated_by_name: str | None = None
188
+ updated_at: datetime | None = None
189
+ effective_base_name: str | None = Field(
190
+ default=None, description="The model the platform actually uses as default"
191
+ )
192
+ source: str | None = None
193
+ temporary_fallback: bool = Field(
194
+ default=False,
195
+ description="True when the saved model is not usable and another one is used",
196
+ )
@@ -1,8 +1,16 @@
1
1
  """Models for analytics-related data structures."""
2
2
 
3
+ import json
3
4
  from typing import Any
4
5
 
5
- from pydantic import BaseModel, ConfigDict, Field
6
+ from pydantic import (
7
+ BaseModel,
8
+ ConfigDict,
9
+ Field,
10
+ field_serializer,
11
+ field_validator,
12
+ model_validator,
13
+ )
6
14
 
7
15
 
8
16
  class ResponseMetadata(BaseModel):
@@ -122,6 +130,19 @@ class UsersListResponse(BaseModel):
122
130
  metadata: ResponseMetadata = Field(description="Response metadata")
123
131
 
124
132
 
133
+ class AnalyticsDetailResponse(BaseModel):
134
+ """Response for analytics detail/drilldown endpoints.
135
+
136
+ ``data`` is intentionally open-ended: each drilldown endpoint returns its own
137
+ sections, so the payload is not typed here.
138
+ """
139
+
140
+ model_config = ConfigDict(extra="ignore")
141
+
142
+ data: dict[str, Any] = Field(description="Detail payload")
143
+ metadata: ResponseMetadata = Field(description="Response metadata")
144
+
145
+
125
146
  class AnalyticsQueryParams(BaseModel):
126
147
  """Query parameters for analytics endpoints."""
127
148
 
@@ -156,6 +177,61 @@ class PaginatedAnalyticsQueryParams(AnalyticsQueryParams):
156
177
  )
157
178
 
158
179
 
180
+ class RunAttributesQueryParams(PaginatedAnalyticsQueryParams):
181
+ """Query parameters of the endpoints that filter by run attributes.
182
+
183
+ Used by ``get_assistants_requests``, ``get_workflows_executions`` and
184
+ ``get_attributes_usage``. Other analytics endpoints do not implement the
185
+ ``attributes`` filter, so it is not part of the shared base class.
186
+ """
187
+
188
+ attributes: str | dict[str, str] | None = Field(
189
+ None,
190
+ description="Run attributes filter: a JSON object of string keys and string "
191
+ "values. A dict is serialized to JSON; a string is sent as it is.",
192
+ )
193
+
194
+ @field_serializer("attributes")
195
+ def _serialize_attributes(self, value: str | dict[str, str] | None) -> str | None:
196
+ """Send a dict as the JSON object the endpoints expect in the query string."""
197
+ if isinstance(value, dict):
198
+ return json.dumps(value)
199
+ return value
200
+
201
+
202
+ class CliInsightsUserDetailQueryParams(AnalyticsQueryParams):
203
+ """Query parameters of the CLI Insights user detail drilldown.
204
+
205
+ The drilldown targets one user through ``user_name`` (and optionally
206
+ ``user_id``), so the shared ``users`` filter is rejected: it could name a
207
+ different user than the one asked for.
208
+ """
209
+
210
+ user_name: str = Field(
211
+ min_length=1, description="User name or e-mail the detail is about"
212
+ )
213
+ user_id: str | None = Field(
214
+ None, description="User id; when set it is checked before the name"
215
+ )
216
+
217
+ @field_validator("user_name", mode="before")
218
+ @classmethod
219
+ def _strip_user_name(cls, value: Any) -> Any:
220
+ """Strip whitespace so a blank name fails the min_length check."""
221
+ if isinstance(value, str):
222
+ return value.strip()
223
+ return value
224
+
225
+ @model_validator(mode="after")
226
+ def _reject_users_filter(self) -> "CliInsightsUserDetailQueryParams":
227
+ if self.users is not None:
228
+ raise ValueError(
229
+ "'users' is not supported for the user detail drilldown; "
230
+ "use 'user_name' and 'user_id' to name the user"
231
+ )
232
+ return self
233
+
234
+
159
235
  # ── CLI Analytics: /v1/analytics/cli-analytics/* ─────────────────────────────
160
236
 
161
237
 
@@ -307,6 +307,10 @@ class Assistant(AssistantBase):
307
307
  system_prompt_history: list[SystemPromptHistory] = Field(default_factory=list)
308
308
  project: str
309
309
  llm_model_type: str | None = None
310
+ effective_llm_model_reason: str | None = Field(
311
+ default=None,
312
+ description="Why the assistant detail shows a different model than the stored one",
313
+ )
310
314
  toolkits: list[ToolKitDetails] = Field(default_factory=list)
311
315
  conversation_starters: list[str] = Field(
312
316
  default_factory=list,
@@ -370,6 +374,7 @@ class Assistant(AssistantBase):
370
374
  interactive_enabled: bool = False
371
375
  enable_image_generation: bool | None = False
372
376
  file_attachment_enabled: bool | None = None
377
+ disabled_context_tools: list[str] = Field(default_factory=list)
373
378
 
374
379
 
375
380
  class AssistantRequestBase(AssistantBase):
@@ -414,6 +419,7 @@ class AssistantRequestBase(AssistantBase):
414
419
  interactive_enabled: bool | None = None
415
420
  enable_image_generation: bool | None = None
416
421
  file_attachment_enabled: bool | None = None
422
+ disabled_context_tools: list[str] | None = None
417
423
 
418
424
 
419
425
  class AssistantCreateRequest(AssistantRequestBase):
@@ -534,6 +540,7 @@ class AssistantVersion(BaseModel):
534
540
  assistant_ids: list[str] = Field(default_factory=list)
535
541
  skill_ids: list[str] | None = None
536
542
  prompt_variables: list[PromptVariable] = Field(default_factory=list)
543
+ disabled_context_tools: list[str] = Field(default_factory=list)
537
544
 
538
545
 
539
546
  class ChatRole(str, Enum):
@@ -619,6 +626,16 @@ class AssistantChatRequest(BaseModel):
619
626
  When false, MCP servers are cached and reused. \
620
627
  If not specified, uses conversation's default setting.",
621
628
  )
629
+ attributes: dict[str, str] | None = Field(
630
+ default=None,
631
+ description="Analytics labels for this run: string keys and string values. \
632
+ Fixed when the conversation starts; the server rejects invalid attributes with 422.",
633
+ )
634
+ save_history: bool | None = Field(
635
+ default=None,
636
+ description="Whether to persist the conversation history. \
637
+ If not specified, the server default (true) applies; false skips saving this interaction.",
638
+ )
622
639
 
623
640
 
624
641
  class AgentMode(str, Enum):
@@ -188,6 +188,7 @@ class ConversationDetails(BaseModel):
188
188
  category: str | None
189
189
  mcp_server_single_usage: bool | None = False
190
190
  finished_at: datetime | None = None
191
+ attributes: dict[str, str] | None = None
191
192
 
192
193
 
193
194
  class ConversationShareRequest(BaseModel):
@@ -85,6 +85,26 @@ class Integration(BaseModel):
85
85
  return dt.isoformat() if dt is not None else None
86
86
 
87
87
 
88
+ class IntegrationListPagination(BaseModel):
89
+ """Pagination block of a combined integrations list response."""
90
+
91
+ model_config = ConfigDict(extra="ignore")
92
+
93
+ page: int
94
+ per_page: int
95
+ total: int
96
+ pages: int
97
+
98
+
99
+ class PaginatedIntegrationResponse(BaseModel):
100
+ """Response of ``GET /v1/settings``: one page of integrations plus its pagination."""
101
+
102
+ model_config = ConfigDict(extra="ignore")
103
+
104
+ data: list[Integration]
105
+ pagination: IntegrationListPagination
106
+
107
+
88
108
  class IntegrationTestRequest(BaseModel):
89
109
  """Model for integration test request."""
90
110
 
@@ -1,8 +1,9 @@
1
1
  """Models for LLM service."""
2
2
 
3
3
  from enum import Enum
4
+ from typing import Annotated, Any
4
5
 
5
- from pydantic import BaseModel, Field
6
+ from pydantic import BaseModel, BeforeValidator, Field
6
7
 
7
8
 
8
9
  class LLMProvider(str, Enum):
@@ -15,6 +16,26 @@ class LLMProvider(str, Enum):
15
16
  ANTHROPIC = "anthropic"
16
17
 
17
18
 
19
+ class ModelStatus(str, Enum):
20
+ """Platform-managed status of an LLM model."""
21
+
22
+ ENABLED = "enabled"
23
+ DISABLED = "disabled"
24
+ DEPRECATED = "deprecated"
25
+
26
+
27
+ def _coerce_model_status(value: Any) -> Any:
28
+ """Return a ModelStatus for known values and keep unknown ones as they are."""
29
+ try:
30
+ return ModelStatus(value)
31
+ except ValueError:
32
+ return value
33
+
34
+
35
+ # Response-side status: a status the SDK does not know yet must not fail parsing.
36
+ ModelStatusValue = Annotated[ModelStatus | str, BeforeValidator(_coerce_model_status)]
37
+
38
+
18
39
  class EffortLevel(str, Enum):
19
40
  """Reasoning effort levels, in ascending order."""
20
41
 
@@ -62,3 +83,4 @@ class LLMModel(BaseModel):
62
83
  is_premium: bool | None = None
63
84
  is_router: bool | None = None
64
85
  supports_tools: bool | None = None
86
+ status: ModelStatusValue | None = None
@@ -158,6 +158,7 @@ class WorkflowExecution(BaseModel):
158
158
  created_by: User
159
159
  conversation_id: str | None = None
160
160
  tokens_usage: TokensUsage | None = None
161
+ attributes: dict[str, str] | None = None
161
162
 
162
163
 
163
164
  class WorkflowEvaluationRequest(BaseModel):
@@ -31,3 +31,7 @@ class WorkflowExecutionCreateRequest(BaseModel):
31
31
  tags: list[str] | None = Field(
32
32
  None, description="Tags to attach to the workflow execution trace in Langfuse"
33
33
  )
34
+ attributes: dict[str, str] | None = Field(
35
+ None,
36
+ description="Analytics labels for this execution: string keys and string values",
37
+ )
@@ -1,14 +1,22 @@
1
1
  """Admin service implementation."""
2
2
 
3
+ from urllib.parse import quote
4
+
3
5
  from ..models.admin import (
6
+ AdminLLMModel,
4
7
  AdminUserListItem,
5
8
  AdminUserListResponse,
6
9
  ApplicationCreateRequest,
7
10
  ApplicationCreateResponse,
8
11
  ApplicationsListResponse,
12
+ GlobalDefaultLLMModel,
13
+ LLMModelStatusBulkItem,
14
+ LLMModelStatusBulkResult,
15
+ LLMModelStatusUpdate,
9
16
  LocalUserCreateRequest,
10
17
  LocalUserDetail,
11
18
  )
19
+ from ..models.llm import ModelStatus
12
20
  from ..utils import ApiRequestHandler, TokenSource
13
21
 
14
22
 
@@ -137,3 +145,87 @@ class AdminService:
137
145
  dict,
138
146
  wrap_response=False,
139
147
  )
148
+
149
+ def list_llm_model_statuses(self) -> list[AdminLLMModel]:
150
+ """List the chat and embedding models an administrator can manage.
151
+
152
+ Models the provider reports as unavailable are not listed.
153
+
154
+ Returns:
155
+ Models with their persisted status
156
+ """
157
+ return self._api.get("/v1/admin/llm/status", list[AdminLLMModel])
158
+
159
+ def set_llm_model_status(
160
+ self, base_name: str, status: ModelStatus | str
161
+ ) -> LLMModelStatusUpdate:
162
+ """Set the status of one model.
163
+
164
+ Args:
165
+ base_name: Base name of the model
166
+ status: New status: enabled, disabled or deprecated
167
+
168
+ Returns:
169
+ The base name and the status that was stored
170
+ """
171
+ return self._api.put(
172
+ f"/v1/admin/llm/{quote(base_name, safe='')}/status",
173
+ LLMModelStatusUpdate,
174
+ json_data={"status": ModelStatus(status).value},
175
+ )
176
+
177
+ def bulk_set_llm_model_statuses(
178
+ self, updates: list[LLMModelStatusBulkItem]
179
+ ) -> LLMModelStatusBulkResult:
180
+ """Set the status of several models in one call.
181
+
182
+ Every item is processed on its own: one failing item does not stop the
183
+ others, and its error is reported in the result.
184
+
185
+ Args:
186
+ updates: Up to 100 items, each with a different base name
187
+
188
+ Returns:
189
+ Totals and the per-item results
190
+ """
191
+ return self._api.post(
192
+ "/v1/admin/llm/status/bulk",
193
+ LLMModelStatusBulkResult,
194
+ json_data={"updates": [item.model_dump() for item in updates]},
195
+ )
196
+
197
+ def get_global_default_llm_model(self) -> GlobalDefaultLLMModel:
198
+ """Get the global default model: the saved choice and the effective one."""
199
+ return self._api.get(
200
+ "/v1/admin/llm/default", GlobalDefaultLLMModel, wrap_response=False
201
+ )
202
+
203
+ def set_global_default_llm_model(self, base_name: str) -> GlobalDefaultLLMModel:
204
+ """Save a model as the global default.
205
+
206
+ Args:
207
+ base_name: Base name of a model that is enabled and available
208
+
209
+ Returns:
210
+ The global default after the change
211
+ """
212
+ return self._api.put(
213
+ "/v1/admin/llm/default",
214
+ GlobalDefaultLLMModel,
215
+ json_data={"base_name": base_name},
216
+ wrap_response=False,
217
+ )
218
+
219
+ def reset_global_default_llm_model(self) -> GlobalDefaultLLMModel:
220
+ """Remove the saved global default so the configured one applies again.
221
+
222
+ Returns:
223
+ The global default after the reset
224
+ """
225
+ result = self._api.delete(
226
+ "/v1/admin/llm/default", GlobalDefaultLLMModel, wrap_response=False
227
+ )
228
+ if result is None:
229
+ # The platform may answer 204 No Content; read the state back instead.
230
+ return self.get_global_default_llm_model()
231
+ return result