Skip to content

Commit a166b9c

Browse files
chore(api): update pinned OpenAPI spec (#1083)
Automated update of the pinned Braintrust OpenAPI specification. - Upstream commit: [`3384e4be354e`](braintrustdata/braintrust-openapi@3384e4b) → [`4cc061569451`](braintrustdata/braintrust-openapi@4cc0615) - [Upstream spec diff](braintrustdata/braintrust-openapi@3384e4b...4cc0615) - Reviewed generated surface: 152 selected operations, 241 reachable schemas → requires manual review (`OpenAPI spec contains unreviewed OpenAPI tags: ['CustomColumns', 'Ingest keys']`) - All upstream operations: 166 → 162 - All upstream component schemas: 261 → 256 ### Operation changes - Added: `createIngestKey`, `deleteCustomColumnId`, `deleteIngestKey`, `getCustomColumn`, `listIngestKeys`, `patchCustomColumnId`, `postCustomColumn`, `putCustomColumn` - Removed: `deleteAgentId`, `deleteOrgAutomationId`, `getAgent`, `getAgentId`, `getOrgAutomation`, `getOrgAutomationId`, `patchAgentId`, `patchOrgAutomationId`, `postAgent`, `postOrgAutomation`, `putAgent`, `putOrgAutomation` ### Component schema changes - Added: `CreateCustomColumn`, `CustomColumn`, `CustomColumnVariant`, `IngestKey`, `PatchCustomColumn` - Removed: `Agent`, `AgentIdParam`, `AgentName`, `CreateAgent`, `CreateOrgAutomation`, `OrgAutomation`, `OrgAutomationIdParam`, `OrgAutomationName`, `PatchAgent`, `PatchOrgAutomation` ### Automated validation The update workflow regenerates committed sources and public API reference sections, then runs: - `make -C py test-api-codegen` - `make -C py test-core` - `cd py && nox -s test_types` This pull request is never auto-merged. Review the upstream and generated diffs, retry-policy classifications, public type changes, and any intentionally unsupported tags before merging. ### Manual fixes The automated run failed regeneration because upstream added the `CustomColumns` and `Ingest keys` tags (unreviewed) and removed the `Agents` and `OrgAutomations` tags (still listed in `endpoint_generator.generated_tags`). Follow-up commits: - Removed `Agents` and `OrgAutomations` from `generated_tags` in `openapi/config.json`. - Added `CustomColumns` and `Ingest keys` to `unsupported_tags` (not yet part of the reviewed public REST client surface), and documented them in `openapi/README.md`. No client resources or types are generated for them. - Regenerated the client and `py/src/braintrust/api/README.md` (deletes `_generated/agents.py`, `_generated/org_automations.py`, and their models). - Hand-written updates: removed the `agents` / `org_automations` properties in `api/client.py` and the Agent / OrgAutomation re-exports in `api/types/__init__.py`; updated `api/test_generated_models.py`, `type_tests/test_api_client.py`, and the pinned unsupported-tag set in `tests/api_codegen/test_generation.py`. **Breaking:** `client.agents`, `client.org_automations`, and the types `Agent`, `CreateAgent`, `PatchAgent`, `GetAgentResponse`, `OrgAutomation`, `CreateOrgAutomation`, `PatchOrgAutomation`, `GetOrgAutomationResponse` are no longer available, matching the upstream removal. ### Workflow results Original automated run: | Check | Result | | --- | --- | | Regeneration | `failure` | | Codegen tests | `failure` | | Runtime tests | `success` | | Type tests | `success` | After manual fixes (run locally): | Check | Result | | --- | --- | | `make -C py generate-api-client` | `success` (140 selected operations, 231 reachable schemas) | | `make -C py check-api-client-codegen` | `success` | | `make -C py test-api-codegen` | `success` (66 passed) | | `make -C py test-core` | `success` (1131 passed) | | `cd py && nox -s test_types` | `success` (37 passed) | | `make -C py lint` | `success` | --------- Co-authored-by: AbhiPrasad <18689448+AbhiPrasad@users.noreply.github.com> Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
1 parent caf8143 commit a166b9c

61 files changed

Lines changed: 468 additions & 1046 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎openapi/README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ The reviewed generated surface includes these tags:
2525
- access and organization resources: Acls, Groups, ProjectGroups, Roles, Users, Organizations,
2626
ApiKeys, and ServiceTokens;
2727
- configuration resources: AiSecrets, EnvVars, Environments, and McpServers;
28-
- project resources: Agents, ProjectAutomations, OrgAutomations, ProjectScores, ProjectTags,
29-
SpanIframes, and Views; and
28+
- project resources: ProjectAutomations, ProjectScores, ProjectTags, SpanIframes, and Views; and
3029
- versioned data resources: DatasetSnapshots.
3130

3231
Each tag produces one resource and operation registry. Models used by one resource stay in that
@@ -37,8 +36,12 @@ Every tag in the pinned spec must be either selected or present in `unsupported_
3736

3837
- **CrossObject:** cross-object event insertion belongs to the specialized at-least-once
3938
log-ingestion path.
39+
- **CustomColumns:** custom column management is not yet part of the reviewed public REST client
40+
surface.
4041
- **Evals:** eval launch is a long-running, payload-dependent workflow that can stream and needs a
4142
specialized client.
43+
- **Ingest keys:** ingest key management is not yet part of the reviewed public REST client
44+
surface.
4245
- **Logs:** project-log event ingestion, fetching, and feedback remain on the specialized logging
4346
path.
4447
- **Other:** the unauthenticated, text-only hello-world endpoint is a service diagnostic rather

‎openapi/config.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"spec": {
44
"repository": "braintrustdata/braintrust-openapi",
55
"path": "openapi/spec.json",
6-
"commit": "3384e4be354ec957292f986fcf3e3a4009907651",
7-
"sha256": "cbb5046620f73b5bf4e1e73c0eb12542ab9cbd3393ec568eda3f1a20f0f90a44"
6+
"commit": "4cc0615694512d6e77fce6bff2c70d1531208daa",
7+
"sha256": "ed5153cb78828024c12575df294a886624341065e9e9dd5095d52992087db1be"
88
},
99
"tools": {
1010
"datamodel-code-generator": "0.81.0",
@@ -36,15 +36,13 @@
3636
"Prompts",
3737
"Functions",
3838
"Acls",
39-
"Agents",
4039
"AiSecrets",
4140
"ApiKeys",
4241
"DatasetSnapshots",
4342
"EnvVars",
4443
"Environments",
4544
"Groups",
4645
"McpServers",
47-
"OrgAutomations",
4846
"Organizations",
4947
"ProjectAutomations",
5048
"ProjectGroups",
@@ -58,7 +56,9 @@
5856
],
5957
"unsupported_tags": {
6058
"CrossObject": "Cross-object event insertion belongs to the specialized at-least-once log-ingestion path.",
59+
"CustomColumns": "Custom column management is not yet part of the reviewed public REST client surface.",
6160
"Evals": "Eval launch is a long-running, payload-dependent workflow that can stream and requires a specialized client.",
61+
"Ingest keys": "Ingest key management is not yet part of the reviewed public REST client surface.",
6262
"Logs": "Project-log event ingestion, fetching, and feedback remain on the specialized logging path.",
6363
"Other": "The unauthenticated text-only hello-world endpoint is a service diagnostic, not a public resource.",
6464
"Proxy": "Provider passthrough requires proxy routing and streaming support, and the catch-all operationId is not valid Python."

‎py/src/braintrust/api/README.md‎

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,13 @@ The table lists every reviewed generated method. Consult the method's Python sig
8888
| `client.prompts` | `post_prompt` — `POST /v1/prompt`<br>`put_prompt` — `PUT /v1/prompt`<br>`get_prompt` — `GET /v1/prompt`<br>`get_prompt_id` — `GET /v1/prompt/{prompt_id}`<br>`patch_prompt_id` — `PATCH /v1/prompt/{prompt_id}`<br>`delete_prompt_id` — `DELETE /v1/prompt/{prompt_id}` |
8989
| `client.functions` | `post_function` — `POST /v1/function`<br>`put_function` — `PUT /v1/function`<br>`get_function` — `GET /v1/function`<br>`get_function_id` — `GET /v1/function/{function_id}`<br>`patch_function_id` — `PATCH /v1/function/{function_id}`<br>`delete_function_id` — `DELETE /v1/function/{function_id}` |
9090
| `client.acls` | `post_acl` — `POST /v1/acl`<br>`delete_acl` — `DELETE /v1/acl`<br>`get_acl` — `GET /v1/acl`<br>`get_acl_id` — `GET /v1/acl/{acl_id}`<br>`delete_acl_id` — `DELETE /v1/acl/{acl_id}`<br>`acl_batch_update` — `POST /v1/acl/batch_update`<br>`acl_list_org` — `GET /v1/acl/list_org` |
91-
| `client.agents` | `post_agent` — `POST /v1/agent`<br>`put_agent` — `PUT /v1/agent`<br>`get_agent` — `GET /v1/agent`<br>`get_agent_id` — `GET /v1/agent/{agent_id}`<br>`patch_agent_id` — `PATCH /v1/agent/{agent_id}`<br>`delete_agent_id` — `DELETE /v1/agent/{agent_id}` |
9291
| `client.ai_secrets` | `post_ai_secret` — `POST /v1/ai_secret`<br>`put_ai_secret` — `PUT /v1/ai_secret`<br>`delete_ai_secret` — `DELETE /v1/ai_secret`<br>`get_ai_secret` — `GET /v1/ai_secret`<br>`get_ai_secret_id` — `GET /v1/ai_secret/{ai_secret_id}`<br>`patch_ai_secret_id` — `PATCH /v1/ai_secret/{ai_secret_id}`<br>`delete_ai_secret_id` — `DELETE /v1/ai_secret/{ai_secret_id}` |
9392
| `client.api_keys` | `get_api_key` — `GET /v1/api_key`<br>`get_api_key_id` — `GET /v1/api_key/{api_key_id}`<br>`delete_api_key_id` — `DELETE /v1/api_key/{api_key_id}` |
9493
| `client.dataset_snapshots` | `post_dataset_snapshot` — `POST /v1/dataset_snapshot`<br>`put_dataset_snapshot` — `PUT /v1/dataset_snapshot`<br>`get_dataset_snapshot` — `GET /v1/dataset_snapshot`<br>`get_dataset_snapshot_id` — `GET /v1/dataset_snapshot/{dataset_snapshot_id}`<br>`patch_dataset_snapshot_id` — `PATCH /v1/dataset_snapshot/{dataset_snapshot_id}`<br>`delete_dataset_snapshot_id` — `DELETE /v1/dataset_snapshot/{dataset_snapshot_id}` |
9594
| `client.env_vars` | `post_env_var` — `POST /v1/env_var`<br>`put_env_var` — `PUT /v1/env_var`<br>`get_env_var` — `GET /v1/env_var`<br>`get_env_var_id` — `GET /v1/env_var/{env_var_id}`<br>`patch_env_var_id` — `PATCH /v1/env_var/{env_var_id}`<br>`delete_env_var_id` — `DELETE /v1/env_var/{env_var_id}` |
9695
| `client.environments` | `list_environments` — `GET /environment`<br>`create_environment` — `POST /environment`<br>`get_environment` — `GET /environment/{environment_id}`<br>`update_environment` — `PATCH /environment/{environment_id}`<br>`delete_environment` — `DELETE /environment/{environment_id}` |
9796
| `client.groups` | `post_group` — `POST /v1/group`<br>`put_group` — `PUT /v1/group`<br>`get_group` — `GET /v1/group`<br>`get_group_id` — `GET /v1/group/{group_id}`<br>`patch_group_id` — `PATCH /v1/group/{group_id}`<br>`delete_group_id` — `DELETE /v1/group/{group_id}` |
9897
| `client.mcp_servers` | `post_mcp_server` — `POST /v1/mcp_server`<br>`put_mcp_server` — `PUT /v1/mcp_server`<br>`get_mcp_server` — `GET /v1/mcp_server`<br>`get_mcp_server_id` — `GET /v1/mcp_server/{mcp_server_id}`<br>`patch_mcp_server_id` — `PATCH /v1/mcp_server/{mcp_server_id}`<br>`delete_mcp_server_id` — `DELETE /v1/mcp_server/{mcp_server_id}` |
99-
| `client.org_automations` | `post_org_automation` — `POST /v1/org_automation`<br>`put_org_automation` — `PUT /v1/org_automation`<br>`get_org_automation` — `GET /v1/org_automation`<br>`get_org_automation_id` — `GET /v1/org_automation/{org_automation_id}`<br>`patch_org_automation_id` — `PATCH /v1/org_automation/{org_automation_id}`<br>`delete_org_automation_id` — `DELETE /v1/org_automation/{org_automation_id}` |
10098
| `client.organizations` | `get_organization` — `GET /v1/organization`<br>`get_organization_id` — `GET /v1/organization/{organization_id}`<br>`patch_organization_id` — `PATCH /v1/organization/{organization_id}`<br>`patch_organization_members` — `PATCH /v1/organization/members`<br>`get_organization_api_keys` — `GET /v1/organization/api_keys` |
10199
| `client.project_automations` | `post_project_automation` — `POST /v1/project_automation`<br>`put_project_automation` — `PUT /v1/project_automation`<br>`get_project_automation` — `GET /v1/project_automation`<br>`get_project_automation_id` — `GET /v1/project_automation/{project_automation_id}`<br>`patch_project_automation_id` — `PATCH /v1/project_automation/{project_automation_id}`<br>`delete_project_automation_id` — `DELETE /v1/project_automation/{project_automation_id}` |
102100
| `client.project_groups` | `post_project_group` — `POST /v1/project_group`<br>`put_project_group` — `PUT /v1/project_group`<br>`get_project_group` — `GET /v1/project_group`<br>`get_project_group_id` — `GET /v1/project_group/{project_group_id}`<br>`patch_project_group_id` — `PATCH /v1/project_group/{project_group_id}`<br>`delete_project_group_id` — `DELETE /v1/project_group/{project_group_id}` |
@@ -132,10 +130,9 @@ Only request and response models reachable directly from reviewed resource metho
132130
| --- | --- | --- |
133131
| `AISecret` | `Acl` | `AclBatchUpdateRequest` |
134132
| `AclBatchUpdateResponse` | `AclItem` | `AclListOrgResponse` |
135-
| `Agent` | `ApiKey` | `CreateAISecret` |
136-
| `CreateAgent` | `CreateDataset` | `CreateDatasetSnapshot` |
137-
| `CreateEnvironment` | `CreateExperiment` | `CreateFunction` |
138-
| `CreateGroup` | `CreateMCPServer` | `CreateOrgAutomation` |
133+
| `ApiKey` | `CreateAISecret` | `CreateDataset` |
134+
| `CreateDatasetSnapshot` | `CreateEnvironment` | `CreateExperiment` |
135+
| `CreateFunction` | `CreateGroup` | `CreateMCPServer` |
139136
| `CreateProject` | `CreateProjectAutomation` | `CreateProjectGroup` |
140137
| `CreateProjectScore` | `CreateProjectTag` | `CreatePrompt` |
141138
| `CreateRole` | `CreateServiceTokenOutput` | `CreateSpanIFrame` |
@@ -145,29 +142,28 @@ Only request and response models reachable directly from reviewed resource metho
145142
| `EnvVar` | `Environment` | `Experiment` |
146143
| `FeedbackDatasetEventRequest` | `FeedbackExperimentEventRequest` | `FeedbackResponseSchema` |
147144
| `FetchDatasetEventsResponse` | `FetchEventsRequest` | `FetchExperimentEventsResponse` |
148-
| `Function` | `GetAclResponse` | `GetAgentResponse` |
149-
| `GetAiSecretResponse` | `GetApiKeyResponse` | `GetDatasetResponse` |
150-
| `GetDatasetSnapshotResponse` | `GetEnvVarResponse` | `GetExperimentResponse` |
151-
| `GetFunctionResponse` | `GetGroupResponse` | `GetMcpServerResponse` |
152-
| `GetOrgAutomationResponse` | `GetOrganizationApiKeysResponse` | `GetOrganizationResponse` |
153-
| `GetProjectAutomationResponse` | `GetProjectGroupResponse` | `GetProjectResponse` |
154-
| `GetProjectScoreResponse` | `GetProjectTagResponse` | `GetPromptResponse` |
155-
| `GetRoleResponse` | `GetServiceTokenResponse` | `GetSpanIframeResponse` |
156-
| `GetUserResponse` | `GetViewResponse` | `Group` |
157-
| `InsertDatasetEventRequest` | `InsertEventsResponse` | `InsertExperimentEventRequest` |
158-
| `ListEnvironmentsResponse` | `MCPServer` | `OrgAutomation` |
159-
| `Organization` | `PatchAISecret` | `PatchAgent` |
160-
| `PatchDataset` | `PatchDatasetSnapshot` | `PatchEnvironment` |
161-
| `PatchExperiment` | `PatchFunction` | `PatchGroup` |
162-
| `PatchMCPServer` | `PatchOrgAutomation` | `PatchOrganization` |
163-
| `PatchOrganizationMembers` | `PatchOrganizationMembersOutput` | `PatchProject` |
164-
| `PatchProjectAutomation` | `PatchProjectGroup` | `PatchProjectScore` |
165-
| `PatchProjectTag` | `PatchPrompt` | `PatchRole` |
166-
| `PatchSpanIFrame` | `PatchView` | `Project` |
167-
| `ProjectAutomation` | `ProjectGroup` | `ProjectScore` |
168-
| `ProjectTag` | `Prompt` | `Role` |
169-
| `ServiceToken` | `SpanIFrame` | `SummarizeDatasetResponse` |
170-
| `SummarizeExperimentResponse` | `User` | `View` |
145+
| `Function` | `GetAclResponse` | `GetAiSecretResponse` |
146+
| `GetApiKeyResponse` | `GetDatasetResponse` | `GetDatasetSnapshotResponse` |
147+
| `GetEnvVarResponse` | `GetExperimentResponse` | `GetFunctionResponse` |
148+
| `GetGroupResponse` | `GetMcpServerResponse` | `GetOrganizationApiKeysResponse` |
149+
| `GetOrganizationResponse` | `GetProjectAutomationResponse` | `GetProjectGroupResponse` |
150+
| `GetProjectResponse` | `GetProjectScoreResponse` | `GetProjectTagResponse` |
151+
| `GetPromptResponse` | `GetRoleResponse` | `GetServiceTokenResponse` |
152+
| `GetSpanIframeResponse` | `GetUserResponse` | `GetViewResponse` |
153+
| `Group` | `InsertDatasetEventRequest` | `InsertEventsResponse` |
154+
| `InsertExperimentEventRequest` | `ListEnvironmentsResponse` | `MCPServer` |
155+
| `Organization` | `PatchAISecret` | `PatchDataset` |
156+
| `PatchDatasetSnapshot` | `PatchEnvironment` | `PatchExperiment` |
157+
| `PatchFunction` | `PatchGroup` | `PatchMCPServer` |
158+
| `PatchOrganization` | `PatchOrganizationMembers` | `PatchOrganizationMembersOutput` |
159+
| `PatchProject` | `PatchProjectAutomation` | `PatchProjectGroup` |
160+
| `PatchProjectScore` | `PatchProjectTag` | `PatchPrompt` |
161+
| `PatchRole` | `PatchSpanIFrame` | `PatchView` |
162+
| `Project` | `ProjectAutomation` | `ProjectGroup` |
163+
| `ProjectScore` | `ProjectTag` | `Prompt` |
164+
| `Role` | `ServiceToken` | `SpanIFrame` |
165+
| `SummarizeDatasetResponse` | `SummarizeExperimentResponse` | `User` |
166+
| `View` | | |
171167
<!-- END GENERATED REST TYPES -->
172168

173169
The reference sections above are synchronized with the Python surface by `make generate-api-client`; do not edit those sections manually.

‎py/src/braintrust/api/_generated/__init__.py‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎py/src/braintrust/api/_generated/acls.py‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)