codemie-sdk-python 0.1.717__tar.gz → 0.1.718__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.
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/PKG-INFO +5 -1
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/README.md +4 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/pyproject.toml +1 -1
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/__init__.py +4 -0
- codemie_sdk_python-0.1.718/src/codemie_sdk/models/admin.py +196 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/analytics.py +24 -1
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/assistant.py +17 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/conversation.py +1 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/integration.py +20 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/llm.py +23 -1
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workflow.py +1 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workflow_execution_payload.py +4 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/admin.py +92 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/analytics.py +53 -2
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/assistant.py +3 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/integration.py +45 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/workflow.py +3 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/workflow_execution.py +4 -1
- codemie_sdk_python-0.1.717/src/codemie_sdk/models/admin.py +0 -98
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/auth/__init__.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/auth/credentials.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/builders/__init__.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/builders/workflow/__init__.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/builders/workflow/builder.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/builders/workflow/definition.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/builders/workflow/publish.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/client/__init__.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/client/client.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/exceptions.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/__init__.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/a2a.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/activity_event.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/categories.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/common.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/cost_center.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/datasource.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/errors.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/file_operation.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/guardrails.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/hosted_application.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/marketplace_management.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/mcp_config.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/mermaid.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/project.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/provisioning.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/skill.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/task.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/usage_attribution.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/user.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_assistant.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_guardrail.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_knowledgebase.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_runtime.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_workflow.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workflow_state.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workflow_thoughts.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workflow_transition.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workspace.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/a2a.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/activity_event.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/budgets.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/categories.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/codemie_guardrails.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/conversation.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/cost_center.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/customer_config_service.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/datasource.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/dynamic_config.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/export.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/files.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/hosted_application.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/llm.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/marketplace_management.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/mcp_configs.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/mermaid.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/project.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/project_budget_groups.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/provisioning.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/skill.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/task.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/usage_attribution.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/user.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/vendor_assistant.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/vendor_guardrail.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/vendor_knowledgebase.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/vendor_runtime.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/vendor_workflow.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/webhook.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/workflow_execution_state.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/workspace.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/utils/__init__.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/utils/http.py +0 -0
- {codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/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.
|
|
3
|
+
Version: 0.1.718
|
|
4
4
|
Summary: CodeMie SDK for Python
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: CodeMie
|
|
@@ -280,6 +280,10 @@ prebuilt_assistant = client.assistants.get_prebuilt_by_slug("assistant-slug")
|
|
|
280
280
|
tools = client.assistants.get_tools()
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
+
#### Disabled Context Tools
|
|
284
|
+
|
|
285
|
+
`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.
|
|
286
|
+
|
|
283
287
|
#### Prompt Variables Support
|
|
284
288
|
|
|
285
289
|
The SDK supports assistant-level prompt variables that the backend already exposes via the `prompt_variables` field.
|
|
@@ -259,6 +259,10 @@ prebuilt_assistant = client.assistants.get_prebuilt_by_slug("assistant-slug")
|
|
|
259
259
|
tools = client.assistants.get_tools()
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
+
#### Disabled Context Tools
|
|
263
|
+
|
|
264
|
+
`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.
|
|
265
|
+
|
|
262
266
|
#### Prompt Variables Support
|
|
263
267
|
|
|
264
268
|
The SDK supports assistant-level prompt variables that the backend already exposes via the `prompt_variables` field.
|
|
@@ -162,6 +162,8 @@ from .models.assistant import (
|
|
|
162
162
|
BuiltinSubagent,
|
|
163
163
|
)
|
|
164
164
|
from .models.integration import (
|
|
165
|
+
IntegrationListPagination,
|
|
166
|
+
PaginatedIntegrationResponse,
|
|
165
167
|
TransferMode,
|
|
166
168
|
TransferItem,
|
|
167
169
|
TransferSettingsResponse,
|
|
@@ -361,6 +363,8 @@ __all__ = [
|
|
|
361
363
|
"SkillPagination",
|
|
362
364
|
"SkillService",
|
|
363
365
|
"BuiltinSubagent",
|
|
366
|
+
"IntegrationListPagination",
|
|
367
|
+
"PaginatedIntegrationResponse",
|
|
364
368
|
"TransferMode",
|
|
365
369
|
"TransferItem",
|
|
366
370
|
"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
|
+
)
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/analytics.py
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
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 BaseModel, ConfigDict, Field, field_serializer
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class ResponseMetadata(BaseModel):
|
|
@@ -156,6 +157,28 @@ class PaginatedAnalyticsQueryParams(AnalyticsQueryParams):
|
|
|
156
157
|
)
|
|
157
158
|
|
|
158
159
|
|
|
160
|
+
class RunAttributesQueryParams(PaginatedAnalyticsQueryParams):
|
|
161
|
+
"""Query parameters of the endpoints that filter by run attributes.
|
|
162
|
+
|
|
163
|
+
Used by ``get_assistants_requests``, ``get_workflows_executions`` and
|
|
164
|
+
``get_attributes_usage``. Other analytics endpoints do not implement the
|
|
165
|
+
``attributes`` filter, so it is not part of the shared base class.
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
attributes: str | dict[str, str] | None = Field(
|
|
169
|
+
None,
|
|
170
|
+
description="Run attributes filter: a JSON object of string keys and string "
|
|
171
|
+
"values. A dict is serialized to JSON; a string is sent as it is.",
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
@field_serializer("attributes")
|
|
175
|
+
def _serialize_attributes(self, value: str | dict[str, str] | None) -> str | None:
|
|
176
|
+
"""Send a dict as the JSON object the endpoints expect in the query string."""
|
|
177
|
+
if isinstance(value, dict):
|
|
178
|
+
return json.dumps(value)
|
|
179
|
+
return value
|
|
180
|
+
|
|
181
|
+
|
|
159
182
|
# ── CLI Analytics: /v1/analytics/cli-analytics/* ─────────────────────────────
|
|
160
183
|
|
|
161
184
|
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/assistant.py
RENAMED
|
@@ -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):
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/integration.py
RENAMED
|
@@ -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
|
|
@@ -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
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/analytics.py
RENAMED
|
@@ -12,6 +12,7 @@ from ..models.analytics import (
|
|
|
12
12
|
CliAnalyticsSessionsResponse,
|
|
13
13
|
CliAnalyticsUsersResponse,
|
|
14
14
|
PaginatedAnalyticsQueryParams,
|
|
15
|
+
RunAttributesQueryParams,
|
|
15
16
|
SummariesResponse,
|
|
16
17
|
TabularResponse,
|
|
17
18
|
UsersListResponse,
|
|
@@ -99,12 +100,14 @@ class AnalyticsService:
|
|
|
99
100
|
|
|
100
101
|
Args:
|
|
101
102
|
params: Query parameters (filters + pagination); ``assistant_id``
|
|
102
|
-
limits the rows to one assistant, ``client_source`` to one client
|
|
103
|
+
limits the rows to one assistant, ``client_source`` to one client,
|
|
104
|
+
``attributes`` (set on ``RunAttributesQueryParams``) to requests that
|
|
105
|
+
carry those run attributes
|
|
103
106
|
|
|
104
107
|
Returns:
|
|
105
108
|
TabularResponse with one row per assistant request, newest first,
|
|
106
109
|
including conversation and request identifiers, tokens, cost,
|
|
107
|
-
execution time and
|
|
110
|
+
execution time, status and the run ``attributes`` column
|
|
108
111
|
"""
|
|
109
112
|
query_params = params.model_dump(exclude_none=True) if params else {}
|
|
110
113
|
return self._api.get(
|
|
@@ -134,6 +137,54 @@ class AnalyticsService:
|
|
|
134
137
|
wrap_response=False,
|
|
135
138
|
)
|
|
136
139
|
|
|
140
|
+
def get_workflows_executions(
|
|
141
|
+
self, params: RunAttributesQueryParams | None = None
|
|
142
|
+
) -> TabularResponse:
|
|
143
|
+
"""Get per-execution workflow analytics, one row per workflow execution.
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
params: Query parameters (filters + pagination); ``params.attributes``
|
|
147
|
+
narrows the rows to executions that carry those run attributes
|
|
148
|
+
|
|
149
|
+
Returns:
|
|
150
|
+
TabularResponse with one row per execution, including the run
|
|
151
|
+
``attributes`` column
|
|
152
|
+
"""
|
|
153
|
+
query_params = params.model_dump(exclude_none=True) if params else {}
|
|
154
|
+
return self._api.get(
|
|
155
|
+
"/v1/analytics/workflows-executions",
|
|
156
|
+
TabularResponse,
|
|
157
|
+
params=query_params,
|
|
158
|
+
wrap_response=False,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
def get_attributes_usage(
|
|
162
|
+
self,
|
|
163
|
+
attribute_key: str | None = None,
|
|
164
|
+
params: RunAttributesQueryParams | None = None,
|
|
165
|
+
) -> TabularResponse:
|
|
166
|
+
"""Get usage grouped by the values of one run attribute key.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
attribute_key: Run attribute key to break usage down by. The server
|
|
170
|
+
requires it; when omitted it answers 422.
|
|
171
|
+
params: Query parameters (filters + pagination); ``params.attributes``
|
|
172
|
+
narrows the rows to runs that also carry those attributes
|
|
173
|
+
|
|
174
|
+
Returns:
|
|
175
|
+
TabularResponse with one row per attribute value (value, conversations,
|
|
176
|
+
workflow_executions, total_tokens, total cost, unique_users, last_used)
|
|
177
|
+
"""
|
|
178
|
+
query_params = params.model_dump(exclude_none=True) if params else {}
|
|
179
|
+
if attribute_key is not None:
|
|
180
|
+
query_params["attribute_key"] = attribute_key
|
|
181
|
+
return self._api.get(
|
|
182
|
+
"/v1/analytics/attributes-usage",
|
|
183
|
+
TabularResponse,
|
|
184
|
+
params=query_params,
|
|
185
|
+
wrap_response=False,
|
|
186
|
+
)
|
|
187
|
+
|
|
137
188
|
def get_tools_usage(
|
|
138
189
|
self, params: PaginatedAnalyticsQueryParams | None = None
|
|
139
190
|
) -> TabularResponse:
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/assistant.py
RENAMED
|
@@ -328,6 +328,9 @@ class AssistantService:
|
|
|
328
328
|
toolkits=version.toolkits
|
|
329
329
|
if hasattr(version, "toolkits")
|
|
330
330
|
else assistant.toolkits,
|
|
331
|
+
disabled_context_tools=version.disabled_context_tools
|
|
332
|
+
if hasattr(version, "disabled_context_tools")
|
|
333
|
+
else assistant.disabled_context_tools,
|
|
331
334
|
shared=assistant.shared,
|
|
332
335
|
is_react=assistant.is_react,
|
|
333
336
|
is_global=assistant.is_global,
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/integration.py
RENAMED
|
@@ -11,6 +11,7 @@ from ..models.integration import (
|
|
|
11
11
|
Integration,
|
|
12
12
|
IntegrationType,
|
|
13
13
|
IntegrationTestRequest,
|
|
14
|
+
PaginatedIntegrationResponse,
|
|
14
15
|
TransferSettingsResponse,
|
|
15
16
|
TypeOfIntegration,
|
|
16
17
|
)
|
|
@@ -93,6 +94,50 @@ class IntegrationService:
|
|
|
93
94
|
self._get_base_path(setting_type), list[Integration], params=params
|
|
94
95
|
)
|
|
95
96
|
|
|
97
|
+
def list_combined(
|
|
98
|
+
self,
|
|
99
|
+
scope: str | None = "all",
|
|
100
|
+
page: int = 0,
|
|
101
|
+
per_page: int = 10,
|
|
102
|
+
filters: dict[str, Any] | str | None = None,
|
|
103
|
+
) -> PaginatedIntegrationResponse:
|
|
104
|
+
"""Get one page of integrations across scopes, newest first.
|
|
105
|
+
|
|
106
|
+
Calls ``GET /v1/settings``. Unlike ``list``, the response keeps its
|
|
107
|
+
pagination block, and ``scope``, ``page`` and ``per_page`` are sent as
|
|
108
|
+
given, without client-side checks, so out-of-range values reach the API.
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
scope: ``"all"`` (user and project integrations together), ``"user"``
|
|
112
|
+
or ``"project"``. ``None`` omits the parameter, which the API
|
|
113
|
+
treats as ``"all"``. Any other string is sent unchanged.
|
|
114
|
+
page: Zero-based page number
|
|
115
|
+
per_page: Number of items per page
|
|
116
|
+
filters: Filters to apply, as a dict (sent as JSON) or as a raw
|
|
117
|
+
string sent unchanged
|
|
118
|
+
|
|
119
|
+
Returns:
|
|
120
|
+
The integrations of the page and the pagination of the whole result
|
|
121
|
+
|
|
122
|
+
Raises:
|
|
123
|
+
requests.exceptions.HTTPError: On 422 (unknown scope, page or
|
|
124
|
+
per_page out of range, malformed ``filters``).
|
|
125
|
+
"""
|
|
126
|
+
params: dict[str, Any] = {"page": page, "per_page": per_page}
|
|
127
|
+
if scope is not None:
|
|
128
|
+
params["scope"] = scope
|
|
129
|
+
if filters is not None:
|
|
130
|
+
params["filters"] = (
|
|
131
|
+
filters if isinstance(filters, str) else json.dumps(filters)
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
return self._api.get(
|
|
135
|
+
"/v1/settings",
|
|
136
|
+
PaginatedIntegrationResponse,
|
|
137
|
+
params=params,
|
|
138
|
+
wrap_response=False,
|
|
139
|
+
)
|
|
140
|
+
|
|
96
141
|
def get(
|
|
97
142
|
self, integration_id: str, setting_type: IntegrationType = IntegrationType.USER
|
|
98
143
|
) -> Integration:
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/workflow.py
RENAMED
|
@@ -193,6 +193,7 @@ class WorkflowService:
|
|
|
193
193
|
headers: dict[str, str] | None = None,
|
|
194
194
|
tags: list[str] | None = None,
|
|
195
195
|
file_names: list[str] | None = None,
|
|
196
|
+
attributes: dict[str, str] | None = None,
|
|
196
197
|
) -> dict:
|
|
197
198
|
"""Run a workflow with optional input parameters.
|
|
198
199
|
|
|
@@ -205,6 +206,7 @@ class WorkflowService:
|
|
|
205
206
|
headers: Optional additional HTTP headers (e.g., X-* for MCP propagation)
|
|
206
207
|
tags: Optional tags to attach to the workflow execution trace in Langfuse.
|
|
207
208
|
file_names: Optional list of file references provided as inputs to the run.
|
|
209
|
+
attributes: Optional analytics labels (string keys and values) fixed for this execution.
|
|
208
210
|
|
|
209
211
|
Returns:
|
|
210
212
|
dict: Created workflow execution details
|
|
@@ -217,6 +219,7 @@ class WorkflowService:
|
|
|
217
219
|
propagate_headers=propagate_headers,
|
|
218
220
|
headers=headers,
|
|
219
221
|
tags=tags,
|
|
222
|
+
attributes=attributes,
|
|
220
223
|
)
|
|
221
224
|
|
|
222
225
|
def evaluate(self, workflow_id: str, request: WorkflowEvaluationRequest) -> dict:
|
|
@@ -56,6 +56,7 @@ class WorkflowExecutionService:
|
|
|
56
56
|
headers: dict[str, str] | None = None,
|
|
57
57
|
tags: list[str] | None = None,
|
|
58
58
|
file_names: list[str] | None = None,
|
|
59
|
+
attributes: dict[str, str] | None = None,
|
|
59
60
|
) -> dict:
|
|
60
61
|
"""Create a new workflow execution.
|
|
61
62
|
|
|
@@ -68,6 +69,7 @@ class WorkflowExecutionService:
|
|
|
68
69
|
headers: Optional additional HTTP headers (e.g., X-* for MCP propagation)
|
|
69
70
|
tags: Optional tags to attach to the workflow execution trace in Langfuse.
|
|
70
71
|
file_names: Optional list of file references provided as inputs to the run.
|
|
72
|
+
attributes: Optional analytics labels (string keys and values) fixed for this execution.
|
|
71
73
|
|
|
72
74
|
Returns:
|
|
73
75
|
dict: Created workflow execution details
|
|
@@ -80,11 +82,12 @@ class WorkflowExecutionService:
|
|
|
80
82
|
session_id=session_id,
|
|
81
83
|
propagate_headers=propagate_headers,
|
|
82
84
|
tags=tags,
|
|
85
|
+
attributes=attributes,
|
|
83
86
|
)
|
|
84
87
|
return self._api.post(
|
|
85
88
|
f"/v1/workflows/{self._workflow_id}/executions",
|
|
86
89
|
dict,
|
|
87
|
-
json_data=payload.model_dump(),
|
|
90
|
+
json_data=payload.model_dump(exclude_none=True),
|
|
88
91
|
extra_headers=headers,
|
|
89
92
|
)
|
|
90
93
|
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"""Admin models for managing applications/projects."""
|
|
2
|
-
|
|
3
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class ApplicationInfo(BaseModel):
|
|
7
|
-
"""Single application entry returned by GET /v1/admin/applications."""
|
|
8
|
-
|
|
9
|
-
model_config = ConfigDict(extra="ignore")
|
|
10
|
-
|
|
11
|
-
name: str
|
|
12
|
-
display_name: str | None = None
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class ApplicationsListResponse(BaseModel):
|
|
16
|
-
"""Response model for list applications endpoint."""
|
|
17
|
-
|
|
18
|
-
model_config = ConfigDict(extra="ignore")
|
|
19
|
-
|
|
20
|
-
applications: list[ApplicationInfo] = Field(
|
|
21
|
-
..., description="List of application info objects"
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class ApplicationCreateRequest(BaseModel):
|
|
26
|
-
"""Request model for creating an application/project."""
|
|
27
|
-
|
|
28
|
-
model_config = ConfigDict(extra="ignore")
|
|
29
|
-
|
|
30
|
-
name: str = Field(..., description="Application/project name")
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class ApplicationCreateResponse(BaseModel):
|
|
34
|
-
"""Response model for create application endpoint."""
|
|
35
|
-
|
|
36
|
-
model_config = ConfigDict(extra="ignore")
|
|
37
|
-
|
|
38
|
-
message: str = Field(..., description="Created application name")
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class LocalUserCreateRequest(BaseModel):
|
|
42
|
-
"""Request model for admin user creation (local auth mode only)."""
|
|
43
|
-
|
|
44
|
-
model_config = ConfigDict(extra="ignore")
|
|
45
|
-
|
|
46
|
-
email: str
|
|
47
|
-
username: str
|
|
48
|
-
password: str
|
|
49
|
-
name: str | None = None
|
|
50
|
-
is_admin: bool = False
|
|
51
|
-
is_maintainer: bool = False
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class LocalUserDetail(BaseModel):
|
|
55
|
-
"""Response model for created/fetched user (local auth mode)."""
|
|
56
|
-
|
|
57
|
-
model_config = ConfigDict(extra="ignore")
|
|
58
|
-
|
|
59
|
-
id: str
|
|
60
|
-
email: str
|
|
61
|
-
username: str
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class AdminUserListItem(BaseModel):
|
|
65
|
-
"""User item returned by the admin list-users endpoint."""
|
|
66
|
-
|
|
67
|
-
model_config = ConfigDict(extra="ignore")
|
|
68
|
-
|
|
69
|
-
id: str
|
|
70
|
-
email: str
|
|
71
|
-
username: str
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class AdminUserListPagination(BaseModel):
|
|
75
|
-
"""Pagination metadata from GET /v1/admin/users."""
|
|
76
|
-
|
|
77
|
-
model_config = ConfigDict(extra="ignore")
|
|
78
|
-
|
|
79
|
-
total: int
|
|
80
|
-
page: int
|
|
81
|
-
per_page: int
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class AdminUserListResponse(BaseModel):
|
|
85
|
-
"""Paginated response from GET /v1/admin/users."""
|
|
86
|
-
|
|
87
|
-
model_config = ConfigDict(extra="ignore")
|
|
88
|
-
|
|
89
|
-
data: list[AdminUserListItem]
|
|
90
|
-
pagination: AdminUserListPagination
|
|
91
|
-
|
|
92
|
-
@property
|
|
93
|
-
def users(self) -> list[AdminUserListItem]:
|
|
94
|
-
return self.data
|
|
95
|
-
|
|
96
|
-
@property
|
|
97
|
-
def total(self) -> int:
|
|
98
|
-
return self.pagination.total
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/auth/credentials.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/builders/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/client/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/activity_event.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/categories.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/cost_center.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/file_operation.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/guardrails.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/mcp_config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/provisioning.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_assistant.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_guardrail.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_runtime.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/vendor_workflow.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workflow_state.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/models/workspace.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/activity_event.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/budgets.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/categories.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/conversation.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/cost_center.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/datasource.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/dynamic_config.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/export.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/mcp_configs.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/mermaid.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/project.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/provisioning.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/vendor_runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/webhook.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.717 → codemie_sdk_python-0.1.718}/src/codemie_sdk/services/workspace.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|