From fa8b52249486b57b8f7208f5277f60973f9e9174 Mon Sep 17 00:00:00 2001 From: AbhiPrasad <18689448+AbhiPrasad@users.noreply.github.com> Date: Mon, 19 Oct 2026 08:24:00 +0000 Subject: [PATCH 1/2] chore(api): update pinned OpenAPI spec --- openapi/config.json | 4 +- openapi/spec.json | 3112 +++++++++++++++++++++++++++++++++---------- 2 files changed, 2401 insertions(+), 715 deletions(-) diff --git a/openapi/config.json b/openapi/config.json index e327ba00..8d7f8977 100644 --- a/openapi/config.json +++ b/openapi/config.json @@ -3,8 +3,8 @@ "spec": { "repository": "braintrustdata/braintrust-openapi", "path": "openapi/spec.json", - "commit": "e53363ed2c1530a53b68872433f68844dceaad1b", - "sha256": "e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478" + "commit": "161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23", + "sha256": "aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68" }, "tools": { "datamodel-code-generator": "0.81.0", diff --git a/openapi/spec.json b/openapi/spec.json index 893dcb1a..def1f96b 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -349,6 +349,21 @@ "type": "string", "description": "Filter search results to within a particular organization" }, + "OrgId": { + "type": "string", + "format": "uuid", + "description": "Identify the organization to list API keys for" + }, + "CreatedAfter": { + "type": "string", + "format": "date-time", + "description": "Include API keys created at or after this timestamp" + }, + "CreatedBefore": { + "type": "string", + "format": "date-time", + "description": "Include API keys created at or before this timestamp" + }, "Ids": { "anyOf": [ { @@ -970,6 +985,7 @@ "preprocessor", "classifier", "review", + "decision", "question", "log", null @@ -5339,7 +5355,6 @@ "type": "string", "format": "uuid" }, - "maxItems": 10000, "description": "Sorted ids of active projects in this project group" } }, @@ -6060,9 +6075,10 @@ "harness": { "type": "string", "enum": [ - "codex", "native", - "claude-code" + "codex", + "claude-code", + "pi" ], "description": "Required when saving a Loop automation. Currently only Codex is supported." }, @@ -10321,6 +10337,237 @@ "title": "topic_map" } ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "simulation" + ] + }, + "config": { + "anyOf": [ + { + "type": "object", + "properties": { + "initiator": { + "type": "string", + "enum": [ + "agent", + "simulated_user" + ], + "default": "agent", + "description": "Who speaks first in the conversation" + }, + "timeout_seconds": { + "type": "integer", + "minimum": 15, + "maximum": 3600, + "default": 600, + "description": "Maximum conversation duration in seconds" + }, + "modality": { + "type": "string", + "enum": [ + "voice" + ], + "default": "voice" + }, + "agent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "livekit" + ] + }, + "server_url": { + "type": "string", + "minLength": 1, + "description": "The WebSocket URL of the LiveKit project hosting the agent" + }, + "agent_name": { + "type": "string", + "minLength": 1, + "description": "The name of the LiveKit agent to dispatch" + } + }, + "required": [ + "type", + "server_url", + "agent_name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "phone" + ] + }, + "phone_number": { + "type": "string", + "pattern": "^\\+[1-9]\\d{7,14}$" + } + }, + "required": [ + "type", + "phone_number" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sip" + ] + }, + "uri": { + "type": "string", + "pattern": "^sips?:[^\\s]+$" + } + }, + "required": [ + "type", + "uri" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "agent" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "initiator": { + "type": "string", + "enum": [ + "agent", + "simulated_user" + ], + "default": "agent", + "description": "Who speaks first in the conversation" + }, + "timeout_seconds": { + "type": "integer", + "minimum": 15, + "maximum": 3600, + "default": 600, + "description": "Maximum conversation duration in seconds" + }, + "modality": { + "type": "string", + "enum": [ + "text" + ] + }, + "agent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "livekit" + ] + }, + "server_url": { + "type": "string", + "minLength": 1, + "description": "The WebSocket URL of the LiveKit project hosting the agent" + }, + "agent_name": { + "type": "string", + "minLength": 1, + "description": "The name of the LiveKit agent to dispatch" + } + }, + "required": [ + "type", + "server_url", + "agent_name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "acp" + ] + }, + "command": { + "type": "string", + "minLength": 1, + "description": "Executable for the ACP agent subprocess, communicating over stdio" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "Arguments passed to the executable without shell interpretation" + }, + "cwd": { + "type": "string", + "pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\)", + "description": "Absolute working directory for the ACP session on the execution host" + }, + "permissions": { + "type": "string", + "enum": [ + "deny" + ], + "default": "deny", + "description": "Deny ACP permission requests; this does not sandbox the subprocess" + } + }, + "required": [ + "type", + "command", + "cwd" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "modality", + "agent" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "config" + ], + "additionalProperties": false, + "description": "A task function that runs a conversation between an agent and a simulated user.", + "title": "simulation" } ] }, @@ -10776,6 +11023,237 @@ } ] }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "simulation" + ] + }, + "config": { + "anyOf": [ + { + "type": "object", + "properties": { + "initiator": { + "type": "string", + "enum": [ + "agent", + "simulated_user" + ], + "default": "agent", + "description": "Who speaks first in the conversation" + }, + "timeout_seconds": { + "type": "integer", + "minimum": 15, + "maximum": 3600, + "default": 600, + "description": "Maximum conversation duration in seconds" + }, + "modality": { + "type": "string", + "enum": [ + "voice" + ], + "default": "voice" + }, + "agent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "livekit" + ] + }, + "server_url": { + "type": "string", + "minLength": 1, + "description": "The WebSocket URL of the LiveKit project hosting the agent" + }, + "agent_name": { + "type": "string", + "minLength": 1, + "description": "The name of the LiveKit agent to dispatch" + } + }, + "required": [ + "type", + "server_url", + "agent_name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "phone" + ] + }, + "phone_number": { + "type": "string", + "pattern": "^\\+[1-9]\\d{7,14}$" + } + }, + "required": [ + "type", + "phone_number" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "sip" + ] + }, + "uri": { + "type": "string", + "pattern": "^sips?:[^\\s]+$" + } + }, + "required": [ + "type", + "uri" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "agent" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "initiator": { + "type": "string", + "enum": [ + "agent", + "simulated_user" + ], + "default": "agent", + "description": "Who speaks first in the conversation" + }, + "timeout_seconds": { + "type": "integer", + "minimum": 15, + "maximum": 3600, + "default": 600, + "description": "Maximum conversation duration in seconds" + }, + "modality": { + "type": "string", + "enum": [ + "text" + ] + }, + "agent": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "livekit" + ] + }, + "server_url": { + "type": "string", + "minLength": 1, + "description": "The WebSocket URL of the LiveKit project hosting the agent" + }, + "agent_name": { + "type": "string", + "minLength": 1, + "description": "The name of the LiveKit agent to dispatch" + } + }, + "required": [ + "type", + "server_url", + "agent_name" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "acp" + ] + }, + "command": { + "type": "string", + "minLength": 1, + "description": "Executable for the ACP agent subprocess, communicating over stdio" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "Arguments passed to the executable without shell interpretation" + }, + "cwd": { + "type": "string", + "pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\)", + "description": "Absolute working directory for the ACP session on the execution host" + }, + "permissions": { + "type": "string", + "enum": [ + "deny" + ], + "default": "deny", + "description": "Deny ACP permission requests; this does not sandbox the subprocess" + } + }, + "required": [ + "type", + "command", + "cwd" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "modality", + "agent" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "config" + ], + "additionalProperties": false, + "description": "A task function that runs a conversation between an agent and a simulated user.", + "title": "simulation" + }, { "type": "null" } @@ -11030,6 +11508,13 @@ "options": { "type": "object", "properties": { + "filterScope": { + "type": "string", + "enum": [ + "span", + "trace" + ] + }, "spanType": { "type": "string", "nullable": true, @@ -11768,7 +12253,7 @@ "token_name": { "type": "string", "nullable": true, - "description": "Optional name of an initial service token to create for the new service account. This is a narrow compatibility carve-out only on PATCH /v1/organization/members. When this field is set, the request must be authenticated with a service token that has organization-owner permissions, not a user API key." + "description": "Optional name of an initial service token to create for the new service account. When set, authenticate with a UI session or service token, not a user API key. The caller must own the organization or the project group specified by invite_users.project_group_id." }, "token_expires_in_seconds": { "type": "integer", @@ -11818,6 +12303,12 @@ "type": "string", "nullable": true, "description": "Singular form of group_names" + }, + "project_group_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Grants new service accounts read access to this project group. Required when a project-group Owner creates service accounts." } }, "description": "Users to invite to the organization" @@ -12462,6 +12953,150 @@ } } }, + "SimulatedUserVoiceConfig": { + "type": "object", + "properties": { + "voice_id": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string", + "minLength": 1 + }, + "accent": { + "type": "string", + "minLength": 1 + }, + "speaking_rate": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + } + }, + "required": [ + "voice_id" + ], + "additionalProperties": false + }, + "SimulatedUser": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the simulated user" + }, + "_xact_id": { + "type": "string", + "description": "Legacy transaction id. Not returned by simulated user CRUD." + }, + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the simulated user belongs under" + }, + "org_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the organization" + }, + "name": { + "type": "string", + "minLength": 1, + "description": "Name of the simulated user" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of simulated user creation" + }, + "instructions": { + "type": "string", + "minLength": 1, + "description": "The simulated user's role, scenario, and behavior" + }, + "goal": { + "type": "string", + "minLength": 1, + "description": "The simulated user's objective, used to decide when to end the conversation" + }, + "voice_config": { + "$ref": "#/components/schemas/SimulatedUserVoiceConfig" + } + }, + "required": [ + "id", + "project_id", + "org_id", + "name", + "instructions", + "voice_config" + ] + }, + "AppLimit": { + "type": "integer", + "nullable": true, + "minimum": 0, + "maximum": 1000, + "default": 100, + "description": "Limit the number of objects to return" + }, + "CreateSimulatedUser": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "Name of the simulated user" + }, + "instructions": { + "type": "string", + "minLength": 1, + "description": "The simulated user's role, scenario, and behavior" + }, + "goal": { + "type": "string", + "minLength": 1, + "description": "The simulated user's objective, used to decide when to end the conversation" + }, + "voice_config": { + "$ref": "#/components/schemas/SimulatedUserVoiceConfig" + } + }, + "required": [ + "name", + "instructions", + "voice_config" + ], + "additionalProperties": false + }, + "PatchSimulatedUser": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "Name of the simulated user" + }, + "instructions": { + "type": "string", + "minLength": 1, + "description": "The simulated user's role, scenario, and behavior" + }, + "goal": { + "type": "string", + "nullable": true, + "minLength": 1, + "description": "The simulated user's objective. Set to null to clear it." + }, + "voice_config": { + "$ref": "#/components/schemas/SimulatedUserVoiceConfig" + } + }, + "additionalProperties": false + }, "Environment": { "type": "object", "properties": { @@ -13773,6 +14408,36 @@ "in": "query", "allowReserved": true }, + "OrgId": { + "schema": { + "$ref": "#/components/schemas/OrgId" + }, + "required": false, + "description": "Identify the organization to list API keys for", + "name": "org_id", + "in": "query", + "allowReserved": true + }, + "CreatedAfter": { + "schema": { + "$ref": "#/components/schemas/CreatedAfter" + }, + "required": false, + "description": "Include API keys created at or after this timestamp", + "name": "created_after", + "in": "query", + "allowReserved": true + }, + "CreatedBefore": { + "schema": { + "$ref": "#/components/schemas/CreatedBefore" + }, + "required": false, + "description": "Include API keys created at or before this timestamp", + "name": "created_before", + "in": "query", + "allowReserved": true + }, "Ids": { "schema": { "$ref": "#/components/schemas/Ids" @@ -31322,6 +31987,212 @@ } } }, + "/v1/organization/api_keys": { + "get": { + "operationId": "getOrganizationApiKeys", + "tags": [ + "Organizations" + ], + "description": "List all API keys associated with users in an organization, sorted by creation date with the newest keys first. An organization-scoped API key determines the organization; otherwise, provide `org_id`. If `org_id` does not match the organization-scoped key's organization, or the caller is not an owner of the organization, no keys are returned. Responses include key metadata only; key secrets are never returned. To list service tokens, use `GET /v1/service_token`.", + "summary": "List organization API keys", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitWithDefaultParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ApiKeyName" + }, + { + "$ref": "#/components/parameters/OrgId" + }, + { + "$ref": "#/components/parameters/CreatedAfter" + }, + { + "$ref": "#/components/parameters/CreatedBefore" + } + ], + "responses": { + "200": { + "description": "Returns a list of api_key objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiKey" + }, + "description": "A list of api_key objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsOrganizationApiKeys", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/organization/api_keys`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, "/v1/api_key": { "get": { "operationId": "getApiKey", @@ -31824,7 +32695,7 @@ {} ], "operationId": "postServiceToken", - "description": "Create a new service token.\n\nWhen calling this endpoint, you must authenticate using a service token that has organization-owner permissions. User API keys cannot be used.", + "description": "Create a new service token.\n\nAuthenticate with a service token. A service token whose service account is an organization owner can create tokens for any service account. A service token whose service account holds the Owner role on a project group can create tokens for a service account in the same organization when the target account has a permission grant on a project group it owns. The calling service account must also hold all of the target account's permissions in the organization; otherwise the request returns 403. User API keys cannot be used.", "summary": "Create service_token", "requestBody": { "description": "Any desired information about the new service_token object", @@ -32104,12 +32975,859 @@ } }, "delete": { - "operationId": "deleteServiceToken", + "operationId": "deleteServiceToken", + "tags": [ + "ServiceTokens" + ], + "description": "Delete a single service_token", + "summary": "Delete single service_token", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "requestBody": { + "description": "Parameters which uniquely specify the service_token to delete", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteServiceToken" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the deleted service_token object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceToken" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getServiceToken", + "tags": [ + "ServiceTokens" + ], + "description": "List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first.\n\nTo create a service token, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner or an Owner of an active project group in the organization, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) with a service token. Results include only service tokens you can manage.", + "summary": "List service_tokens", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ServiceTokenName" + }, + { + "$ref": "#/components/parameters/OrgName" + } + ], + "responses": { + "200": { + "description": "Returns a list of service_token objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceToken" + }, + "description": "A list of service_token objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsServiceToken", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/service_token`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/service_token/{service_token_id}": { + "get": { + "operationId": "getServiceTokenId", + "tags": [ + "ServiceTokens" + ], + "description": "Get a service_token object by its id", + "summary": "Get service_token", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ServiceTokenIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the service_token object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceToken" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteServiceTokenId", + "tags": [ + "ServiceTokens" + ], + "description": "Delete a service_token object by its id", + "summary": "Delete service_token", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ServiceTokenIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the deleted service_token object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceToken" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsServiceTokenId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/service_token/{service_token_id}`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ServiceTokenIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/ai_secret": { + "post": { + "tags": [ + "AiSecrets" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "postAiSecret", + "description": "Create a new ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will return the existing ai_secret unmodified", + "summary": "Create ai_secret", + "requestBody": { + "description": "Any desired information about the new ai_secret object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAISecret" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new ai_secret object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AISecret" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "put": { + "tags": [ + "AiSecrets" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "putAiSecret", + "description": "Create or replace ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will replace the existing ai_secret with the provided fields", + "summary": "Create or replace ai_secret", + "requestBody": { + "description": "Any desired information about the new ai_secret object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAISecret" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new ai_secret object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AISecret" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteAiSecret", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "Delete a single service_token", - "summary": "Delete single service_token", + "description": "Delete a single ai_secret", + "summary": "Delete single ai_secret", "security": [ { "bearerAuth": [] @@ -32117,23 +33835,23 @@ {} ], "requestBody": { - "description": "Parameters which uniquely specify the service_token to delete", + "description": "Parameters which uniquely specify the ai_secret to delete", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteServiceToken" + "$ref": "#/components/schemas/DeleteAISecret" } } } }, "responses": { "200": { - "description": "Returns the deleted service_token object", + "description": "Returns the deleted ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" } } } @@ -32223,12 +33941,12 @@ } }, "get": { - "operationId": "getServiceToken", + "operationId": "getAiSecret", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first.\n\nTo create a service token, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) and authenticate with a service token that has organization-owner permissions.", - "summary": "List service_tokens", + "description": "List out all ai_secrets. The ai_secrets are sorted by creation date, with the most recently-created ai_secrets coming first", + "summary": "List ai_secrets", "security": [ { "bearerAuth": [] @@ -32249,15 +33967,18 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/ServiceTokenName" + "$ref": "#/components/parameters/AiSecretName" }, { "$ref": "#/components/parameters/OrgName" + }, + { + "$ref": "#/components/parameters/AISecretType" } ], "responses": { "200": { - "description": "Returns a list of service_token objects", + "description": "Returns a list of ai_secret objects", "content": { "application/json": { "schema": { @@ -32266,9 +33987,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" }, - "description": "A list of service_token objects" + "description": "A list of ai_secret objects" } }, "required": [ @@ -32364,9 +34085,9 @@ } }, "options": { - "operationId": "optionsServiceToken", + "operationId": "optionsAiSecret", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/service_token`)", + "summary": "Enable CORS (`/v1/ai_secret`)", "security": [], "tags": [ "CORS" @@ -32421,14 +34142,14 @@ } } }, - "/v1/service_token/{service_token_id}": { + "/v1/ai_secret/{ai_secret_id}": { "get": { - "operationId": "getServiceTokenId", + "operationId": "getAiSecretId", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "Get a service_token object by its id", - "summary": "Get service_token", + "description": "Get an ai_secret object by its id", + "summary": "Get ai_secret", "security": [ { "bearerAuth": [] @@ -32437,16 +34158,140 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "$ref": "#/components/parameters/AiSecretIdParam" } ], "responses": { "200": { - "description": "Returns the service_token object", + "description": "Returns the ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "patch": { + "operationId": "patchAiSecretId", + "tags": [ + "AiSecrets" + ], + "description": "Partially update an ai_secret object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update ai_secret", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AiSecretIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchAISecret" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the ai_secret object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AISecret" } } } @@ -32536,12 +34381,12 @@ } }, "delete": { - "operationId": "deleteServiceTokenId", + "operationId": "deleteAiSecretId", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "Delete a service_token object by its id", - "summary": "Delete service_token", + "description": "Delete an ai_secret object by its id", + "summary": "Delete ai_secret", "security": [ { "bearerAuth": [] @@ -32550,16 +34395,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "$ref": "#/components/parameters/AiSecretIdParam" } ], "responses": { "200": { - "description": "Returns the deleted service_token object", + "description": "Returns the deleted ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" } } } @@ -32649,16 +34494,16 @@ } }, "options": { - "operationId": "optionsServiceTokenId", + "operationId": "optionsAiSecretId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/service_token/{service_token_id}`)", + "summary": "Enable CORS (`/v1/ai_secret/{ai_secret_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "$ref": "#/components/parameters/AiSecretIdParam" } ], "responses": { @@ -32711,10 +34556,10 @@ } } }, - "/v1/ai_secret": { + "/v1/env_var": { "post": { "tags": [ - "AiSecrets" + "EnvVars" ], "security": [ { @@ -32722,27 +34567,71 @@ }, {} ], - "operationId": "postAiSecret", - "description": "Create a new ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will return the existing ai_secret unmodified", - "summary": "Create ai_secret", + "operationId": "postEnvVar", + "description": "Create a new env_var. If there is an existing env_var with the same name as the one specified in the request, will return the existing env_var unmodified", + "summary": "Create env_var", "requestBody": { - "description": "Any desired information about the new ai_secret object", + "description": "Any desired information about the new env_var object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAISecret" + "type": "object", + "properties": { + "object_type": { + "type": "string", + "enum": [ + "organization", + "project", + "function", + "mcp_server" + ], + "description": "The type of the object the environment variable is scoped for" + }, + "object_id": { + "type": "string", + "format": "uuid", + "description": "The id of the object the environment variable is scoped for" + }, + "name": { + "type": "string", + "description": "The name of the environment variable" + }, + "value": { + "type": "string", + "nullable": true, + "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + } + }, + "required": [ + "object_type", + "object_id", + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the new ai_secret object", + "description": "Returns the new env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -32833,154 +34722,79 @@ }, "put": { "tags": [ - "AiSecrets" - ], - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "operationId": "putAiSecret", - "description": "Create or replace ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will replace the existing ai_secret with the provided fields", - "summary": "Create or replace ai_secret", - "requestBody": { - "description": "Any desired information about the new ai_secret object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAISecret" - } - } - } - }, - "responses": { - "200": { - "description": "Returns the new ai_secret object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AISecret" - } - } - } - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "401": { - "description": "No valid API key provided", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { - "schema": { - "type": "string" - } - } - }, - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - }, - "delete": { - "operationId": "deleteAiSecret", - "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Delete a single ai_secret", - "summary": "Delete single ai_secret", "security": [ { "bearerAuth": [] }, {} ], + "operationId": "putEnvVar", + "description": "Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields", + "summary": "Create or replace env_var", "requestBody": { - "description": "Parameters which uniquely specify the ai_secret to delete", + "description": "Any desired information about the new env_var object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteAISecret" + "type": "object", + "properties": { + "object_type": { + "type": "string", + "enum": [ + "organization", + "project", + "function", + "mcp_server" + ], + "description": "The type of the object the environment variable is scoped for" + }, + "object_id": { + "type": "string", + "format": "uuid", + "description": "The id of the object the environment variable is scoped for" + }, + "name": { + "type": "string", + "description": "The name of the environment variable" + }, + "value": { + "type": "string", + "nullable": true, + "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + } + }, + "required": [ + "object_type", + "object_id", + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the deleted ai_secret object", + "description": "Returns the new env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -33070,12 +34884,12 @@ } }, "get": { - "operationId": "getAiSecret", + "operationId": "getEnvVar", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "List out all ai_secrets. The ai_secrets are sorted by creation date, with the most recently-created ai_secrets coming first", - "summary": "List ai_secrets", + "description": "List out all env_vars. The env_vars are sorted by creation date, with the most recently-created env_vars coming first", + "summary": "List env_vars", "security": [ { "bearerAuth": [] @@ -33086,28 +34900,22 @@ { "$ref": "#/components/parameters/AppLimitParam" }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, { "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/AiSecretName" + "$ref": "#/components/parameters/EnvVarName" }, { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/EnvVarObjectType" }, { - "$ref": "#/components/parameters/AISecretType" + "$ref": "#/components/parameters/EnvVarObjectId" } ], "responses": { "200": { - "description": "Returns a list of ai_secret objects", + "description": "Returns a list of env_var objects", "content": { "application/json": { "schema": { @@ -33116,9 +34924,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" }, - "description": "A list of ai_secret objects" + "description": "A list of env_var objects" } }, "required": [ @@ -33214,9 +35022,9 @@ } }, "options": { - "operationId": "optionsAiSecret", + "operationId": "optionsEnvVar", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/ai_secret`)", + "summary": "Enable CORS (`/v1/env_var`)", "security": [], "tags": [ "CORS" @@ -33271,14 +35079,14 @@ } } }, - "/v1/ai_secret/{ai_secret_id}": { + "/v1/env_var/{env_var_id}": { "get": { - "operationId": "getAiSecretId", + "operationId": "getEnvVarId", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Get an ai_secret object by its id", - "summary": "Get ai_secret", + "description": "Get an env_var object by its id", + "summary": "Get env_var", "security": [ { "bearerAuth": [] @@ -33287,16 +35095,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "responses": { "200": { - "description": "Returns the ai_secret object", + "description": "Returns the env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -33386,12 +35194,12 @@ } }, "patch": { - "operationId": "patchAiSecretId", + "operationId": "patchEnvVarId", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Partially update an ai_secret object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update ai_secret", + "description": "Partially update an env_var object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update env_var", "security": [ { "bearerAuth": [] @@ -33400,27 +35208,54 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "requestBody": { "description": "Fields to update", - "required": false, + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchAISecret" + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the environment variable" + }, + "value": { + "type": "string", + "nullable": true, + "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + } + }, + "required": [ + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the ai_secret object", + "description": "Returns the env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -33510,12 +35345,12 @@ } }, "delete": { - "operationId": "deleteAiSecretId", + "operationId": "deleteEnvVarId", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Delete an ai_secret object by its id", - "summary": "Delete ai_secret", + "description": "Delete an env_var object by its id", + "summary": "Delete env_var", "security": [ { "bearerAuth": [] @@ -33524,16 +35359,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "responses": { "200": { - "description": "Returns the deleted ai_secret object", + "description": "Returns the deleted env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -33623,16 +35458,16 @@ } }, "options": { - "operationId": "optionsAiSecretId", + "operationId": "optionsEnvVarId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/ai_secret/{ai_secret_id}`)", + "summary": "Enable CORS (`/v1/env_var/{env_var_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "responses": { @@ -33685,10 +35520,10 @@ } } }, - "/v1/env_var": { + "/v1/mcp_server": { "post": { "tags": [ - "EnvVars" + "McpServers" ], "security": [ { @@ -33696,71 +35531,27 @@ }, {} ], - "operationId": "postEnvVar", - "description": "Create a new env_var. If there is an existing env_var with the same name as the one specified in the request, will return the existing env_var unmodified", - "summary": "Create env_var", + "operationId": "postMcpServer", + "description": "Create a new mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will return the existing mcp_server unmodified", + "summary": "Create mcp_server", "requestBody": { - "description": "Any desired information about the new env_var object", + "description": "Any desired information about the new mcp_server object", "required": true, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "object_type": { - "type": "string", - "enum": [ - "organization", - "project", - "function", - "mcp_server" - ], - "description": "The type of the object the environment variable is scoped for" - }, - "object_id": { - "type": "string", - "format": "uuid", - "description": "The id of the object the environment variable is scoped for" - }, - "name": { - "type": "string", - "description": "The name of the environment variable" - }, - "value": { - "type": "string", - "nullable": true, - "description": "The value of the environment variable. Will be encrypted at rest." - }, - "metadata": { - "type": "object", - "nullable": true, - "additionalProperties": { - "nullable": true - }, - "description": "Optional metadata associated with the environment variable when managed via the function secrets API" - }, - "secret_type": { - "type": "string", - "nullable": true, - "description": "Optional classification for the secret (for example, the AI provider name)" - } - }, - "required": [ - "object_type", - "object_id", - "name" - ] + "$ref": "#/components/schemas/CreateMCPServer" } } } }, "responses": { "200": { - "description": "Returns the new env_var object", + "description": "Returns the new mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -33851,7 +35642,7 @@ }, "put": { "tags": [ - "EnvVars" + "McpServers" ], "security": [ { @@ -33859,71 +35650,27 @@ }, {} ], - "operationId": "putEnvVar", - "description": "Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields", - "summary": "Create or replace env_var", + "operationId": "putMcpServer", + "description": "Create or replace mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will replace the existing mcp_server with the provided fields", + "summary": "Create or replace mcp_server", "requestBody": { - "description": "Any desired information about the new env_var object", + "description": "Any desired information about the new mcp_server object", "required": true, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "object_type": { - "type": "string", - "enum": [ - "organization", - "project", - "function", - "mcp_server" - ], - "description": "The type of the object the environment variable is scoped for" - }, - "object_id": { - "type": "string", - "format": "uuid", - "description": "The id of the object the environment variable is scoped for" - }, - "name": { - "type": "string", - "description": "The name of the environment variable" - }, - "value": { - "type": "string", - "nullable": true, - "description": "The value of the environment variable. Will be encrypted at rest." - }, - "metadata": { - "type": "object", - "nullable": true, - "additionalProperties": { - "nullable": true - }, - "description": "Optional metadata associated with the environment variable when managed via the function secrets API" - }, - "secret_type": { - "type": "string", - "nullable": true, - "description": "Optional classification for the secret (for example, the AI provider name)" - } - }, - "required": [ - "object_type", - "object_id", - "name" - ] + "$ref": "#/components/schemas/CreateMCPServer" } } } }, "responses": { "200": { - "description": "Returns the new env_var object", + "description": "Returns the new mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -34013,12 +35760,12 @@ } }, "get": { - "operationId": "getEnvVar", + "operationId": "getMcpServer", "tags": [ - "EnvVars" + "McpServers" ], - "description": "List out all env_vars. The env_vars are sorted by creation date, with the most recently-created env_vars coming first", - "summary": "List env_vars", + "description": "List out all mcp_servers. The mcp_servers are sorted by creation date, with the most recently-created mcp_servers coming first", + "summary": "List mcp_servers", "security": [ { "bearerAuth": [] @@ -34030,21 +35777,24 @@ "$ref": "#/components/parameters/AppLimitParam" }, { - "$ref": "#/components/parameters/Ids" + "$ref": "#/components/parameters/StartingAfter" }, { - "$ref": "#/components/parameters/EnvVarName" + "$ref": "#/components/parameters/EndingBefore" }, { - "$ref": "#/components/parameters/EnvVarObjectType" + "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/EnvVarObjectId" + "$ref": "#/components/parameters/McpServerName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns a list of env_var objects", + "description": "Returns a list of mcp_server objects", "content": { "application/json": { "schema": { @@ -34053,9 +35803,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" }, - "description": "A list of env_var objects" + "description": "A list of mcp_server objects" } }, "required": [ @@ -34151,9 +35901,9 @@ } }, "options": { - "operationId": "optionsEnvVar", + "operationId": "optionsMcpServer", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/env_var`)", + "summary": "Enable CORS (`/v1/mcp_server`)", "security": [], "tags": [ "CORS" @@ -34208,14 +35958,14 @@ } } }, - "/v1/env_var/{env_var_id}": { + "/v1/mcp_server/{mcp_server_id}": { "get": { - "operationId": "getEnvVarId", + "operationId": "getMcpServerId", "tags": [ - "EnvVars" + "McpServers" ], - "description": "Get an env_var object by its id", - "summary": "Get env_var", + "description": "Get a mcp_server object by its id", + "summary": "Get mcp_server", "security": [ { "bearerAuth": [] @@ -34224,16 +35974,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "responses": { "200": { - "description": "Returns the env_var object", + "description": "Returns the mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -34323,12 +36073,12 @@ } }, "patch": { - "operationId": "patchEnvVarId", + "operationId": "patchMcpServerId", "tags": [ - "EnvVars" + "McpServers" ], - "description": "Partially update an env_var object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update env_var", + "description": "Partially update a mcp_server object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update mcp_server", "security": [ { "bearerAuth": [] @@ -34337,54 +36087,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "requestBody": { "description": "Fields to update", - "required": true, + "required": false, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the environment variable" - }, - "value": { - "type": "string", - "nullable": true, - "description": "The value of the environment variable. Will be encrypted at rest." - }, - "metadata": { - "type": "object", - "nullable": true, - "additionalProperties": { - "nullable": true - }, - "description": "Optional metadata associated with the environment variable when managed via the function secrets API" - }, - "secret_type": { - "type": "string", - "nullable": true, - "description": "Optional classification for the secret (for example, the AI provider name)" - } - }, - "required": [ - "name" - ] + "$ref": "#/components/schemas/PatchMCPServer" } } } }, "responses": { "200": { - "description": "Returns the env_var object", + "description": "Returns the mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -34474,12 +36197,12 @@ } }, "delete": { - "operationId": "deleteEnvVarId", + "operationId": "deleteMcpServerId", "tags": [ - "EnvVars" + "McpServers" ], - "description": "Delete an env_var object by its id", - "summary": "Delete env_var", + "description": "Delete a mcp_server object by its id", + "summary": "Delete mcp_server", "security": [ { "bearerAuth": [] @@ -34488,16 +36211,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "responses": { "200": { - "description": "Returns the deleted env_var object", + "description": "Returns the deleted mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -34587,16 +36310,16 @@ } }, "options": { - "operationId": "optionsEnvVarId", + "operationId": "optionsMcpServerId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/env_var/{env_var_id}`)", + "summary": "Enable CORS (`/v1/mcp_server/{mcp_server_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "responses": { @@ -34649,10 +36372,10 @@ } } }, - "/v1/mcp_server": { + "/v1/dataset_snapshot": { "post": { "tags": [ - "McpServers" + "DatasetSnapshots" ], "security": [ { @@ -34660,27 +36383,27 @@ }, {} ], - "operationId": "postMcpServer", - "description": "Create a new mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will return the existing mcp_server unmodified", - "summary": "Create mcp_server", + "operationId": "postDatasetSnapshot", + "description": "Create a new dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will return the existing dataset_snapshot unmodified", + "summary": "Create dataset_snapshot", "requestBody": { - "description": "Any desired information about the new mcp_server object", + "description": "Any desired information about the new dataset_snapshot object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMCPServer" + "$ref": "#/components/schemas/CreateDatasetSnapshot" } } } }, "responses": { "200": { - "description": "Returns the new mcp_server object", + "description": "Returns the new dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -34771,7 +36494,7 @@ }, "put": { "tags": [ - "McpServers" + "DatasetSnapshots" ], "security": [ { @@ -34779,27 +36502,27 @@ }, {} ], - "operationId": "putMcpServer", - "description": "Create or replace mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will replace the existing mcp_server with the provided fields", - "summary": "Create or replace mcp_server", + "operationId": "putDatasetSnapshot", + "description": "Create or replace dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will replace the existing dataset_snapshot with the provided fields", + "summary": "Create or replace dataset_snapshot", "requestBody": { - "description": "Any desired information about the new mcp_server object", + "description": "Any desired information about the new dataset_snapshot object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMCPServer" + "$ref": "#/components/schemas/CreateDatasetSnapshot" } } } }, "responses": { "200": { - "description": "Returns the new mcp_server object", + "description": "Returns the new dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -34889,12 +36612,12 @@ } }, "get": { - "operationId": "getMcpServer", + "operationId": "getDatasetSnapshot", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "List out all mcp_servers. The mcp_servers are sorted by creation date, with the most recently-created mcp_servers coming first", - "summary": "List mcp_servers", + "description": "List out all dataset_snapshots. The dataset_snapshots are sorted by creation date, with the most recently-created dataset_snapshots coming first", + "summary": "List dataset_snapshots", "security": [ { "bearerAuth": [] @@ -34915,7 +36638,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/McpServerName" + "$ref": "#/components/parameters/DatasetSnapshotName" }, { "$ref": "#/components/parameters/OrgName" @@ -34923,7 +36646,7 @@ ], "responses": { "200": { - "description": "Returns a list of mcp_server objects", + "description": "Returns a list of dataset_snapshot objects", "content": { "application/json": { "schema": { @@ -34932,9 +36655,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" }, - "description": "A list of mcp_server objects" + "description": "A list of dataset_snapshot objects" } }, "required": [ @@ -35030,9 +36753,9 @@ } }, "options": { - "operationId": "optionsMcpServer", + "operationId": "optionsDatasetSnapshot", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/mcp_server`)", + "summary": "Enable CORS (`/v1/dataset_snapshot`)", "security": [], "tags": [ "CORS" @@ -35087,14 +36810,14 @@ } } }, - "/v1/mcp_server/{mcp_server_id}": { + "/v1/dataset_snapshot/{dataset_snapshot_id}": { "get": { - "operationId": "getMcpServerId", + "operationId": "getDatasetSnapshotId", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "Get a mcp_server object by its id", - "summary": "Get mcp_server", + "description": "Get a dataset_snapshot object by its id", + "summary": "Get dataset_snapshot", "security": [ { "bearerAuth": [] @@ -35103,16 +36826,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } ], "responses": { "200": { - "description": "Returns the mcp_server object", + "description": "Returns the dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -35202,12 +36925,12 @@ } }, "patch": { - "operationId": "patchMcpServerId", + "operationId": "patchDatasetSnapshotId", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "Partially update a mcp_server object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update mcp_server", + "description": "Partially update a dataset_snapshot object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update dataset_snapshot", "security": [ { "bearerAuth": [] @@ -35216,7 +36939,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } ], "requestBody": { @@ -35225,18 +36948,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchMCPServer" + "$ref": "#/components/schemas/PatchDatasetSnapshot" } } } }, "responses": { "200": { - "description": "Returns the mcp_server object", + "description": "Returns the dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -35326,12 +37049,12 @@ } }, "delete": { - "operationId": "deleteMcpServerId", + "operationId": "deleteDatasetSnapshotId", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "Delete a mcp_server object by its id", - "summary": "Delete mcp_server", + "description": "Delete a dataset_snapshot object by its id", + "summary": "Delete dataset_snapshot", "security": [ { "bearerAuth": [] @@ -35340,195 +37063,12 @@ ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" - } - ], - "responses": { - "200": { - "description": "Returns the deleted mcp_server object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServer" - } - } - } - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "401": { - "description": "No valid API key provided", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { - "schema": { - "type": "string" - } - } - }, - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - }, - "options": { - "operationId": "optionsMcpServerId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/mcp_server/{mcp_server_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/McpServerIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } - } - } - }, - "/v1/dataset_snapshot": { - "post": { - "tags": [ - "DatasetSnapshots" - ], - "security": [ - { - "bearerAuth": [] - }, - {} ], - "operationId": "postDatasetSnapshot", - "description": "Create a new dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will return the existing dataset_snapshot unmodified", - "summary": "Create dataset_snapshot", - "requestBody": { - "description": "Any desired information about the new dataset_snapshot object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateDatasetSnapshot" - } - } - } - }, "responses": { "200": { - "description": "Returns the new dataset_snapshot object", + "description": "Returns the deleted dataset_snapshot object", "content": { "application/json": { "schema": { @@ -35621,9 +37161,76 @@ } } }, - "put": { + "options": { + "operationId": "optionsDatasetSnapshotId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`)", + "security": [], "tags": [ - "DatasetSnapshots" + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetSnapshotIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/project/{project_id}/simulated_user": { + "get": { + "operationId": "listSimulatedUsers", + "summary": "List simulated users", + "description": "List simulated users in a project, ordered by UUID. Requires project read permission.", + "tags": [ + "Simulated users" ], "security": [ { @@ -35631,27 +37238,79 @@ }, {} ], - "operationId": "putDatasetSnapshot", - "description": "Create or replace dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will replace the existing dataset_snapshot with the provided fields", - "summary": "Create or replace dataset_snapshot", - "requestBody": { - "description": "Any desired information about the new dataset_snapshot object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateDatasetSnapshot" - } - } + "parameters": [ + { + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "project_id", + "in": "path" + }, + { + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 1000 + } + ] + }, + "required": false, + "name": "ids", + "in": "query" + }, + { + "schema": { + "type": "string" + }, + "required": false, + "name": "simulated_user_name", + "in": "query" + }, + { + "schema": { + "$ref": "#/components/schemas/AppLimit" + }, + "required": false, + "description": "Limit the number of objects to return", + "name": "limit", + "in": "query" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" } - }, + ], "responses": { "200": { - "description": "Returns the new dataset_snapshot object", + "description": "The matching simulated users", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatasetSnapshot" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SimulatedUser" + } + } + }, + "required": [ + "objects" + ] } } } @@ -35740,13 +37399,13 @@ } } }, - "get": { - "operationId": "getDatasetSnapshot", + "post": { + "operationId": "createSimulatedUser", + "summary": "Create simulated user", + "description": "Create a simulated user with a new UUID. Display names may repeat. Requires project update permission.", "tags": [ - "DatasetSnapshots" + "Simulated users" ], - "description": "List out all dataset_snapshots. The dataset_snapshots are sorted by creation date, with the most recently-created dataset_snapshots coming first", - "summary": "List dataset_snapshots", "security": [ { "bearerAuth": [] @@ -35755,44 +37414,32 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/DatasetSnapshotName" - }, - { - "$ref": "#/components/parameters/OrgName" + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "project_id", + "in": "path" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSimulatedUser" + } + } + } + }, "responses": { "200": { - "description": "Returns a list of dataset_snapshot objects", + "description": "The simulated user, including its stable UUID", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetSnapshot" - }, - "description": "A list of dataset_snapshot objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/SimulatedUser" } } } @@ -35882,9 +37529,9 @@ } }, "options": { - "operationId": "optionsDatasetSnapshot", + "operationId": "optionsSimulatedUsers", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset_snapshot`)", + "summary": "Enable CORS (`/v1/project/{project_id}/simulated_user`)", "security": [], "tags": [ "CORS" @@ -35939,14 +37586,14 @@ } } }, - "/v1/dataset_snapshot/{dataset_snapshot_id}": { + "/v1/project/{project_id}/simulated_user/{id}": { "get": { - "operationId": "getDatasetSnapshotId", + "operationId": "getSimulatedUser", + "summary": "Get simulated user", + "description": "Retrieve a simulated user by its UUID within the specified project. Requires project read permission.", "tags": [ - "DatasetSnapshots" + "Simulated users" ], - "description": "Get a dataset_snapshot object by its id", - "summary": "Get dataset_snapshot", "security": [ { "bearerAuth": [] @@ -35955,16 +37602,31 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetSnapshotIdParam" + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "project_id", + "in": "path" + }, + { + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "id", + "in": "path" } ], "responses": { "200": { - "description": "Returns the dataset_snapshot object", + "description": "The simulated user, including its stable UUID", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatasetSnapshot" + "$ref": "#/components/schemas/SimulatedUser" } } } @@ -36054,12 +37716,12 @@ } }, "patch": { - "operationId": "patchDatasetSnapshotId", + "operationId": "patchSimulatedUser", + "summary": "Update simulated user", + "description": "Update an existing simulated user while preserving its UUID. Supplied voice_config replaces the entire voice configuration. Set goal to null to clear it. Requires project update permission and project read permission because the response includes the stored simulated user.", "tags": [ - "DatasetSnapshots" + "Simulated users" ], - "description": "Partially update a dataset_snapshot object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update dataset_snapshot", "security": [ { "bearerAuth": [] @@ -36068,27 +37730,41 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetSnapshotIdParam" + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "project_id", + "in": "path" + }, + { + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "id", + "in": "path" } ], "requestBody": { - "description": "Fields to update", - "required": false, + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchDatasetSnapshot" + "$ref": "#/components/schemas/PatchSimulatedUser" } } } }, "responses": { "200": { - "description": "Returns the dataset_snapshot object", + "description": "The simulated user, including its stable UUID", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatasetSnapshot" + "$ref": "#/components/schemas/SimulatedUser" } } } @@ -36178,12 +37854,12 @@ } }, "delete": { - "operationId": "deleteDatasetSnapshotId", + "operationId": "deleteSimulatedUser", + "summary": "Delete simulated user", + "description": "Delete an existing simulated user in the specified project. Requires project update permission and project read permission because the response includes the stored simulated user.", "tags": [ - "DatasetSnapshots" + "Simulated users" ], - "description": "Delete a dataset_snapshot object by its id", - "summary": "Delete dataset_snapshot", "security": [ { "bearerAuth": [] @@ -36192,16 +37868,31 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetSnapshotIdParam" + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "project_id", + "in": "path" + }, + { + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "name": "id", + "in": "path" } ], "responses": { "200": { - "description": "Returns the deleted dataset_snapshot object", + "description": "The simulated user, including its stable UUID", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatasetSnapshot" + "$ref": "#/components/schemas/SimulatedUser" } } } @@ -36291,18 +37982,13 @@ } }, "options": { - "operationId": "optionsDatasetSnapshotId", + "operationId": "optionsSimulatedUser", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`)", + "summary": "Enable CORS (`/v1/project/{project_id}/simulated_user/{id}`)", "security": [], "tags": [ "CORS" ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetSnapshotIdParam" - } - ], "responses": { "200": { "description": "Response for CORS method", From fd87a46f8257362be5765367f1496e2b42941cad Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Mon, 19 Oct 2026 08:52:18 +0000 Subject: [PATCH 2/2] chore(api): generate Simulated users resource from pinned spec Classify the new `Simulated users` OpenAPI tag as a generated resource so spec validation passes, regenerate the client for the updated pin, and wire `BraintrustOpenApiClient.simulated_users` plus its public request/response types (and the new `GetOrganizationApiKeysResponse`). Co-Authored-By: Claude Opus 5.5 --- openapi/README.md | 2 +- openapi/config.json | 1 + py/src/braintrust/api/README.md | 49 ++-- py/src/braintrust/api/_generated/__init__.py | 4 +- py/src/braintrust/api/_generated/acls.py | 4 +- py/src/braintrust/api/_generated/agents.py | 4 +- .../braintrust/api/_generated/ai_secrets.py | 4 +- py/src/braintrust/api/_generated/api_keys.py | 10 +- .../api/_generated/dataset_snapshots.py | 4 +- py/src/braintrust/api/_generated/datasets.py | 4 +- py/src/braintrust/api/_generated/env_vars.py | 4 +- .../braintrust/api/_generated/environments.py | 4 +- .../braintrust/api/_generated/experiments.py | 8 +- py/src/braintrust/api/_generated/functions.py | 4 +- py/src/braintrust/api/_generated/groups.py | 4 +- .../braintrust/api/_generated/mcp_servers.py | 4 +- .../api/_generated/models/__init__.py | 118 ++++++-- .../braintrust/api/_generated/models/acls.py | 4 +- .../api/_generated/models/agents.py | 4 +- .../api/_generated/models/ai_secrets.py | 4 +- .../api/_generated/models/api_keys.py | 52 +--- .../api/_generated/models/common.py | 57 +++- .../_generated/models/dataset_snapshots.py | 4 +- .../api/_generated/models/datasets.py | 4 +- .../api/_generated/models/env_vars.py | 4 +- .../api/_generated/models/environments.py | 4 +- .../api/_generated/models/experiments.py | 12 +- .../api/_generated/models/functions.py | 179 +++++++++++- .../api/_generated/models/groups.py | 4 +- .../api/_generated/models/mcp_servers.py | 4 +- .../api/_generated/models/org_automations.py | 4 +- .../api/_generated/models/organizations.py | 37 ++- .../_generated/models/project_automations.py | 48 ++-- .../api/_generated/models/project_groups.py | 4 +- .../api/_generated/models/project_scores.py | 4 +- .../api/_generated/models/project_tags.py | 4 +- .../api/_generated/models/projects.py | 4 +- .../api/_generated/models/prompts.py | 4 +- .../braintrust/api/_generated/models/roles.py | 4 +- .../api/_generated/models/service_tokens.py | 4 +- .../api/_generated/models/simulated_users.py | 95 +++++++ .../api/_generated/models/span_iframes.py | 4 +- .../braintrust/api/_generated/models/users.py | 4 +- .../braintrust/api/_generated/models/views.py | 7 +- .../api/_generated/org_automations.py | 4 +- .../api/_generated/organizations.py | 111 +++++++- .../api/_generated/project_automations.py | 4 +- .../api/_generated/project_groups.py | 4 +- .../api/_generated/project_scores.py | 4 +- .../braintrust/api/_generated/project_tags.py | 4 +- py/src/braintrust/api/_generated/projects.py | 4 +- py/src/braintrust/api/_generated/prompts.py | 4 +- py/src/braintrust/api/_generated/roles.py | 4 +- .../api/_generated/service_tokens.py | 4 +- .../api/_generated/simulated_users.py | 262 ++++++++++++++++++ .../braintrust/api/_generated/span_iframes.py | 4 +- py/src/braintrust/api/_generated/users.py | 4 +- py/src/braintrust/api/_generated/views.py | 4 +- py/src/braintrust/api/client.py | 7 + .../braintrust/api/test_generated_models.py | 1 + py/src/braintrust/api/types/__init__.py | 10 + .../braintrust/type_tests/test_api_client.py | 1 + 62 files changed, 1003 insertions(+), 232 deletions(-) create mode 100644 py/src/braintrust/api/_generated/models/simulated_users.py create mode 100644 py/src/braintrust/api/_generated/simulated_users.py diff --git a/openapi/README.md b/openapi/README.md index 0b0c4336..736f8ca0 100644 --- a/openapi/README.md +++ b/openapi/README.md @@ -24,7 +24,7 @@ The reviewed generated surface includes these tags: ApiKeys, and ServiceTokens; - configuration resources: AiSecrets, EnvVars, Environments, and McpServers; - project resources: Agents, ProjectAutomations, OrgAutomations, ProjectScores, ProjectTags, - SpanIframes, and Views; and + Simulated users, SpanIframes, and Views; and - versioned data resources: DatasetSnapshots. Each tag produces one resource and operation registry. Models used by one resource stay in that diff --git a/openapi/config.json b/openapi/config.json index 8d7f8977..59ffdb53 100644 --- a/openapi/config.json +++ b/openapi/config.json @@ -52,6 +52,7 @@ "ProjectTags", "Roles", "ServiceTokens", + "Simulated users", "SpanIframes", "Users", "Views" diff --git a/py/src/braintrust/api/README.md b/py/src/braintrust/api/README.md index b462b73b..32ec8f68 100644 --- a/py/src/braintrust/api/README.md +++ b/py/src/braintrust/api/README.md @@ -97,13 +97,14 @@ The table lists every reviewed generated method. Consult the method's Python sig | `client.groups` | `post_group` — `POST /v1/group`
`put_group` — `PUT /v1/group`
`get_group` — `GET /v1/group`
`get_group_id` — `GET /v1/group/{group_id}`
`patch_group_id` — `PATCH /v1/group/{group_id}`
`delete_group_id` — `DELETE /v1/group/{group_id}` | | `client.mcp_servers` | `post_mcp_server` — `POST /v1/mcp_server`
`put_mcp_server` — `PUT /v1/mcp_server`
`get_mcp_server` — `GET /v1/mcp_server`
`get_mcp_server_id` — `GET /v1/mcp_server/{mcp_server_id}`
`patch_mcp_server_id` — `PATCH /v1/mcp_server/{mcp_server_id}`
`delete_mcp_server_id` — `DELETE /v1/mcp_server/{mcp_server_id}` | | `client.org_automations` | `post_org_automation` — `POST /v1/org_automation`
`put_org_automation` — `PUT /v1/org_automation`
`get_org_automation` — `GET /v1/org_automation`
`get_org_automation_id` — `GET /v1/org_automation/{org_automation_id}`
`patch_org_automation_id` — `PATCH /v1/org_automation/{org_automation_id}`
`delete_org_automation_id` — `DELETE /v1/org_automation/{org_automation_id}` | -| `client.organizations` | `get_organization` — `GET /v1/organization`
`get_organization_id` — `GET /v1/organization/{organization_id}`
`patch_organization_id` — `PATCH /v1/organization/{organization_id}`
`patch_organization_members` — `PATCH /v1/organization/members` | +| `client.organizations` | `get_organization` — `GET /v1/organization`
`get_organization_id` — `GET /v1/organization/{organization_id}`
`patch_organization_id` — `PATCH /v1/organization/{organization_id}`
`patch_organization_members` — `PATCH /v1/organization/members`
`get_organization_api_keys` — `GET /v1/organization/api_keys` | | `client.project_automations` | `post_project_automation` — `POST /v1/project_automation`
`put_project_automation` — `PUT /v1/project_automation`
`get_project_automation` — `GET /v1/project_automation`
`get_project_automation_id` — `GET /v1/project_automation/{project_automation_id}`
`patch_project_automation_id` — `PATCH /v1/project_automation/{project_automation_id}`
`delete_project_automation_id` — `DELETE /v1/project_automation/{project_automation_id}` | | `client.project_groups` | `post_project_group` — `POST /v1/project_group`
`put_project_group` — `PUT /v1/project_group`
`get_project_group` — `GET /v1/project_group`
`get_project_group_id` — `GET /v1/project_group/{project_group_id}`
`patch_project_group_id` — `PATCH /v1/project_group/{project_group_id}`
`delete_project_group_id` — `DELETE /v1/project_group/{project_group_id}` | | `client.project_scores` | `post_project_score` — `POST /v1/project_score`
`put_project_score` — `PUT /v1/project_score`
`get_project_score` — `GET /v1/project_score`
`get_project_score_id` — `GET /v1/project_score/{project_score_id}`
`patch_project_score_id` — `PATCH /v1/project_score/{project_score_id}`
`delete_project_score_id` — `DELETE /v1/project_score/{project_score_id}` | | `client.project_tags` | `post_project_tag` — `POST /v1/project_tag`
`put_project_tag` — `PUT /v1/project_tag`
`get_project_tag` — `GET /v1/project_tag`
`get_project_tag_id` — `GET /v1/project_tag/{project_tag_id}`
`patch_project_tag_id` — `PATCH /v1/project_tag/{project_tag_id}`
`delete_project_tag_id` — `DELETE /v1/project_tag/{project_tag_id}` | | `client.roles` | `post_role` — `POST /v1/role`
`put_role` — `PUT /v1/role`
`get_role` — `GET /v1/role`
`get_role_id` — `GET /v1/role/{role_id}`
`patch_role_id` — `PATCH /v1/role/{role_id}`
`delete_role_id` — `DELETE /v1/role/{role_id}` | | `client.service_tokens` | `post_service_token` — `POST /v1/service_token`
`put_service_token` — `PUT /v1/service_token`
`delete_service_token` — `DELETE /v1/service_token`
`get_service_token` — `GET /v1/service_token`
`get_service_token_id` — `GET /v1/service_token/{service_token_id}`
`delete_service_token_id` — `DELETE /v1/service_token/{service_token_id}` | +| `client.simulated_users` | `list_simulated_users` — `GET /v1/project/{project_id}/simulated_user`
`create_simulated_user` — `POST /v1/project/{project_id}/simulated_user`
`get_simulated_user` — `GET /v1/project/{project_id}/simulated_user/{id}`
`patch_simulated_user` — `PATCH /v1/project/{project_id}/simulated_user/{id}`
`delete_simulated_user` — `DELETE /v1/project/{project_id}/simulated_user/{id}` | | `client.span_iframes` | `post_span_iframe` — `POST /v1/span_iframe`
`put_span_iframe` — `PUT /v1/span_iframe`
`get_span_iframe` — `GET /v1/span_iframe`
`get_span_iframe_id` — `GET /v1/span_iframe/{span_iframe_id}`
`patch_span_iframe_id` — `PATCH /v1/span_iframe/{span_iframe_id}`
`delete_span_iframe_id` — `DELETE /v1/span_iframe/{span_iframe_id}` | | `client.users` | `get_user` — `GET /v1/user`
`get_user_id` — `GET /v1/user/{user_id}` | | `client.views` | `post_view` — `POST /v1/view`
`put_view` — `PUT /v1/view`
`get_view` — `GET /v1/view`
`get_view_id` — `GET /v1/view/{view_id}`
`patch_view_id` — `PATCH /v1/view/{view_id}`
`delete_view_id` — `DELETE /v1/view/{view_id}` | @@ -138,22 +139,23 @@ Only request and response models reachable directly from reviewed resource metho | `CreateGroup` | `CreateMCPServer` | `CreateOrgAutomation` | | `CreateProject` | `CreateProjectAutomation` | `CreateProjectGroup` | | `CreateProjectScore` | `CreateProjectTag` | `CreatePrompt` | -| `CreateRole` | `CreateServiceTokenOutput` | `CreateSpanIFrame` | -| `CreateView` | `Dataset` | `DatasetSnapshot` | -| `DeleteAISecret` | `DeleteServiceToken` | `DeleteView` | -| `EnvVar` | `Environment` | `Experiment` | -| `FeedbackDatasetEventRequest` | `FeedbackExperimentEventRequest` | `FeedbackResponseSchema` | -| `FetchDatasetEventsResponse` | `FetchEventsRequest` | `FetchExperimentEventsResponse` | -| `Function` | `GetAclResponse` | `GetAgentResponse` | -| `GetAiSecretResponse` | `GetApiKeyResponse` | `GetDatasetResponse` | -| `GetDatasetSnapshotResponse` | `GetEnvVarResponse` | `GetExperimentResponse` | -| `GetFunctionResponse` | `GetGroupResponse` | `GetMcpServerResponse` | -| `GetOrgAutomationResponse` | `GetOrganizationResponse` | `GetProjectAutomationResponse` | -| `GetProjectGroupResponse` | `GetProjectResponse` | `GetProjectScoreResponse` | -| `GetProjectTagResponse` | `GetPromptResponse` | `GetRoleResponse` | -| `GetServiceTokenResponse` | `GetSpanIframeResponse` | `GetUserResponse` | -| `GetViewResponse` | `Group` | `InsertDatasetEventRequest` | -| `InsertEventsResponse` | `InsertExperimentEventRequest` | `ListEnvironmentsResponse` | +| `CreateRole` | `CreateServiceTokenOutput` | `CreateSimulatedUser` | +| `CreateSpanIFrame` | `CreateView` | `Dataset` | +| `DatasetSnapshot` | `DeleteAISecret` | `DeleteServiceToken` | +| `DeleteView` | `EnvVar` | `Environment` | +| `Experiment` | `FeedbackDatasetEventRequest` | `FeedbackExperimentEventRequest` | +| `FeedbackResponseSchema` | `FetchDatasetEventsResponse` | `FetchEventsRequest` | +| `FetchExperimentEventsResponse` | `Function` | `GetAclResponse` | +| `GetAgentResponse` | `GetAiSecretResponse` | `GetApiKeyResponse` | +| `GetDatasetResponse` | `GetDatasetSnapshotResponse` | `GetEnvVarResponse` | +| `GetExperimentResponse` | `GetFunctionResponse` | `GetGroupResponse` | +| `GetMcpServerResponse` | `GetOrgAutomationResponse` | `GetOrganizationApiKeysResponse` | +| `GetOrganizationResponse` | `GetProjectAutomationResponse` | `GetProjectGroupResponse` | +| `GetProjectResponse` | `GetProjectScoreResponse` | `GetProjectTagResponse` | +| `GetPromptResponse` | `GetRoleResponse` | `GetServiceTokenResponse` | +| `GetSpanIframeResponse` | `GetUserResponse` | `GetViewResponse` | +| `Group` | `InsertDatasetEventRequest` | `InsertEventsResponse` | +| `InsertExperimentEventRequest` | `ListEnvironmentsResponse` | `ListSimulatedUsersResponse` | | `MCPServer` | `OrgAutomation` | `Organization` | | `PatchAISecret` | `PatchAgent` | `PatchDataset` | | `PatchDatasetSnapshot` | `PatchEnvironment` | `PatchExperiment` | @@ -161,12 +163,13 @@ Only request and response models reachable directly from reviewed resource metho | `PatchOrgAutomation` | `PatchOrganization` | `PatchOrganizationMembers` | | `PatchOrganizationMembersOutput` | `PatchProject` | `PatchProjectAutomation` | | `PatchProjectGroup` | `PatchProjectScore` | `PatchProjectTag` | -| `PatchPrompt` | `PatchRole` | `PatchSpanIFrame` | -| `PatchView` | `Project` | `ProjectAutomation` | -| `ProjectGroup` | `ProjectScore` | `ProjectTag` | -| `Prompt` | `Role` | `ServiceToken` | -| `SpanIFrame` | `SummarizeDatasetResponse` | `SummarizeExperimentResponse` | -| `User` | `View` | | +| `PatchPrompt` | `PatchRole` | `PatchSimulatedUser` | +| `PatchSpanIFrame` | `PatchView` | `Project` | +| `ProjectAutomation` | `ProjectGroup` | `ProjectScore` | +| `ProjectTag` | `Prompt` | `Role` | +| `ServiceToken` | `SimulatedUser` | `SpanIFrame` | +| `SummarizeDatasetResponse` | `SummarizeExperimentResponse` | `User` | +| `View` | | | The reference sections above are synchronized with the Python surface by `make generate-api-client`; do not edit those sections manually. diff --git a/py/src/braintrust/api/_generated/__init__.py b/py/src/braintrust/api/_generated/__init__.py index 37bc8992..0ebc1e18 100644 --- a/py/src/braintrust/api/_generated/__init__.py +++ b/py/src/braintrust/api/_generated/__init__.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/acls.py b/py/src/braintrust/api/_generated/acls.py index 2271b55b..1ce1e1c8 100644 --- a/py/src/braintrust/api/_generated/acls.py +++ b/py/src/braintrust/api/_generated/acls.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/agents.py b/py/src/braintrust/api/_generated/agents.py index e8894bde..4a40ff7d 100644 --- a/py/src/braintrust/api/_generated/agents.py +++ b/py/src/braintrust/api/_generated/agents.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/ai_secrets.py b/py/src/braintrust/api/_generated/ai_secrets.py index efd4ce7a..e457352e 100644 --- a/py/src/braintrust/api/_generated/ai_secrets.py +++ b/py/src/braintrust/api/_generated/ai_secrets.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/api_keys.py b/py/src/braintrust/api/_generated/api_keys.py index c58e8d36..32ffc5e8 100644 --- a/py/src/braintrust/api/_generated/api_keys.py +++ b/py/src/braintrust/api/_generated/api_keys.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: f5a0286093c954f653d2e7b36cdc1a029cfec9605bcbe99d2e1f86dd9f394470 +# Content SHA-256: 9204f237ad6353fe9618b71de1466df014712cb27a050392c51b79c21eb9e4e4 """Generated ApiKeys REST operations and resource.""" @@ -12,8 +12,8 @@ from .._service import Operation, Parameter, ResourceAPI from ..policies import RetryMode -from .models.api_keys import ApiKey, ApiKeyIdParam, ApiKeyName, GetApiKeyResponse -from .models.common import AppLimitParam, EndingBefore, Ids, OrgName, StartingAfter +from .models.api_keys import ApiKeyIdParam, GetApiKeyResponse +from .models.common import ApiKey, ApiKeyName, AppLimitParam, EndingBefore, Ids, OrgName, StartingAfter GET_API_KEY = Operation( diff --git a/py/src/braintrust/api/_generated/dataset_snapshots.py b/py/src/braintrust/api/_generated/dataset_snapshots.py index d60e3a84..93abf6e3 100644 --- a/py/src/braintrust/api/_generated/dataset_snapshots.py +++ b/py/src/braintrust/api/_generated/dataset_snapshots.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/datasets.py b/py/src/braintrust/api/_generated/datasets.py index 870a7b64..9d5da2e7 100644 --- a/py/src/braintrust/api/_generated/datasets.py +++ b/py/src/braintrust/api/_generated/datasets.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/env_vars.py b/py/src/braintrust/api/_generated/env_vars.py index 48febf3b..7213f41f 100644 --- a/py/src/braintrust/api/_generated/env_vars.py +++ b/py/src/braintrust/api/_generated/env_vars.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/environments.py b/py/src/braintrust/api/_generated/environments.py index 2b877855..676a4f39 100644 --- a/py/src/braintrust/api/_generated/environments.py +++ b/py/src/braintrust/api/_generated/environments.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/experiments.py b/py/src/braintrust/api/_generated/experiments.py index 68d58804..9687d139 100644 --- a/py/src/braintrust/api/_generated/experiments.py +++ b/py/src/braintrust/api/_generated/experiments.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: a3a944dbc3203812c4d9f566f7719bfa986680ccee6a2429005dac87045b4563 +# Content SHA-256: de13157e35fd67e3c804c95ac78aff347f490075ca92c7a8cf143c52a06fb637 """Generated Experiments REST operations and resource.""" @@ -13,6 +13,7 @@ from .._service import Operation, Parameter, ResourceAPI from ..policies import RetryMode from .models.common import ( + AppLimitWithDefaultParam, EndingBefore, FeedbackResponseSchema, FetchEventsRequest, @@ -28,7 +29,6 @@ Version, ) from .models.experiments import ( - AppLimitWithDefaultParam, ComparisonExperimentId, CreateExperiment, Experiment, diff --git a/py/src/braintrust/api/_generated/functions.py b/py/src/braintrust/api/_generated/functions.py index 59b0c300..dec7df6e 100644 --- a/py/src/braintrust/api/_generated/functions.py +++ b/py/src/braintrust/api/_generated/functions.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/groups.py b/py/src/braintrust/api/_generated/groups.py index 769415cd..f6a6b144 100644 --- a/py/src/braintrust/api/_generated/groups.py +++ b/py/src/braintrust/api/_generated/groups.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/mcp_servers.py b/py/src/braintrust/api/_generated/mcp_servers.py index fd70e3d3..20f80611 100644 --- a/py/src/braintrust/api/_generated/mcp_servers.py +++ b/py/src/braintrust/api/_generated/mcp_servers.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/__init__.py b/py/src/braintrust/api/_generated/models/__init__.py index 6bf9045e..4c17bfc9 100644 --- a/py/src/braintrust/api/_generated/models/__init__.py +++ b/py/src/braintrust/api/_generated/models/__init__.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: dcafdbf2659d531e25aea236d7c114e37d3534e7e1c7fb8c9cdbc4880b01cf37 +# Content SHA-256: 44a11f04b2b3d6f3160a8710cc469e17724cf5fca2c6428e5224c2c7c9eb1b76 """Generated private model types with lazy package-level imports.""" @@ -40,11 +40,14 @@ GetAiSecretResponse, PatchAISecret, ) - from .api_keys import ApiKey, ApiKeyIdParam, ApiKeyName, GetApiKeyResponse + from .api_keys import ApiKeyIdParam, GetApiKeyResponse from .common import ( AclObjectId, AclObjectType, + ApiKey, + ApiKeyName, AppLimitParam, + AppLimitWithDefaultParam, AutomationStatus, CacheControl, ChatCompletionContentPart, @@ -166,7 +169,6 @@ from .env_vars import EnvVar, EnvVarIdParam, EnvVarName, EnvVarObjectId, EnvVarObjectType, GetEnvVarResponse from .environments import CreateEnvironment, Environment, ListEnvironmentsResponse, PatchEnvironment from .experiments import ( - AppLimitWithDefaultParam, ComparisonExperimentId, Context, CreateExperiment, @@ -192,8 +194,22 @@ SummarizeScores, ) from .functions import ( + Agent1, + Agent10, + Agent2, + Agent3, + Agent4, + Agent5, + Agent6, + Agent7, + Agent8, + Agent9, BatchedFacetData, CodeBundle, + Config6, + Config7, + Config8, + Config9, CreateFunction, Data, Data1, @@ -213,12 +229,14 @@ FunctionData3, FunctionData4, FunctionData5, + FunctionData6, FunctionDataNullish, FunctionDataNullish1, FunctionDataNullish2, FunctionDataNullish3, FunctionDataNullish4, FunctionDataNullish5, + FunctionDataNullish6, FunctionIdParam, FunctionIdRef, FunctionName, @@ -284,9 +302,13 @@ ) from .organizations import ( AddedUser, + CreatedAfter, + CreatedBefore, + GetOrganizationApiKeysResponse, GetOrganizationResponse, ImageRenderingMode, InviteUsers, + OrgId, Organization, OrganizationIdParam, PatchOrganization, @@ -322,19 +344,19 @@ Calculation, Condition, Config1, - Config10, - Config11, Config12, Config13, Config14, Config15, Config16, Config17, + Config18, + Config19, Config2, + Config20, + Config21, Config3, Config5, - Config8, - Config9, CreateProjectAutomation, Credentials, Credentials1, @@ -463,6 +485,14 @@ ServiceTokenIdParam, ServiceTokenName, ) + from .simulated_users import ( + AppLimit, + CreateSimulatedUser, + ListSimulatedUsersResponse, + PatchSimulatedUser, + SimulatedUser, + SimulatedUserVoiceConfig, + ) from .span_iframes import ( CreateSpanIFrame, GetSpanIframeResponse, @@ -540,15 +570,26 @@ "AddMemberPermission": "roles", "AddedUser": "organizations", "Agent": "agents", + "Agent1": "functions", + "Agent10": "functions", + "Agent2": "functions", + "Agent3": "functions", + "Agent4": "functions", + "Agent5": "functions", + "Agent6": "functions", + "Agent7": "functions", + "Agent8": "functions", + "Agent9": "functions", "AgentIdParam": "agents", "AgentName": "agents", "AiSecretIdParam": "ai_secrets", "AiSecretName": "ai_secrets", - "ApiKey": "api_keys", + "ApiKey": "common", "ApiKeyIdParam": "api_keys", - "ApiKeyName": "api_keys", + "ApiKeyName": "common", + "AppLimit": "simulated_users", "AppLimitParam": "common", - "AppLimitWithDefaultParam": "experiments", + "AppLimitWithDefaultParam": "common", "AutomationStatus": "common", "BackfillTimeRange": "project_automations", "BatchedFacetData": "functions", @@ -580,20 +621,24 @@ "Condition": "project_automations", "Config": "org_automations", "Config1": "project_automations", - "Config10": "project_automations", - "Config11": "project_automations", "Config12": "project_automations", "Config13": "project_automations", "Config14": "project_automations", "Config15": "project_automations", "Config16": "project_automations", "Config17": "project_automations", + "Config18": "project_automations", + "Config19": "project_automations", "Config2": "project_automations", + "Config20": "project_automations", + "Config21": "project_automations", "Config3": "project_automations", "Config4": "common", "Config5": "project_automations", - "Config8": "project_automations", - "Config9": "project_automations", + "Config6": "functions", + "Config7": "functions", + "Config8": "functions", + "Config9": "functions", "Context": "experiments", "CreateAISecret": "ai_secrets", "CreateAgent": "agents", @@ -613,8 +658,11 @@ "CreatePrompt": "prompts", "CreateRole": "roles", "CreateServiceTokenOutput": "service_tokens", + "CreateSimulatedUser": "simulated_users", "CreateSpanIFrame": "span_iframes", "CreateView": "views", + "CreatedAfter": "organizations", + "CreatedBefore": "organizations", "Credentials": "project_automations", "Credentials1": "project_automations", "Credentials2": "project_automations", @@ -701,12 +749,14 @@ "FunctionData3": "functions", "FunctionData4": "functions", "FunctionData5": "functions", + "FunctionData6": "functions", "FunctionDataNullish": "functions", "FunctionDataNullish1": "functions", "FunctionDataNullish2": "functions", "FunctionDataNullish3": "functions", "FunctionDataNullish4": "functions", "FunctionDataNullish5": "functions", + "FunctionDataNullish6": "functions", "FunctionIdParam": "functions", "FunctionIdRef": "functions", "FunctionName": "functions", @@ -725,6 +775,7 @@ "GetGroupResponse": "groups", "GetMcpServerResponse": "mcp_servers", "GetOrgAutomationResponse": "org_automations", + "GetOrganizationApiKeysResponse": "organizations", "GetOrganizationResponse": "organizations", "GetProjectAutomationResponse": "project_automations", "GetProjectGroupResponse": "project_groups", @@ -764,6 +815,7 @@ "InternalMetadata": "experiments", "InviteUsers": "organizations", "ListEnvironmentsResponse": "environments", + "ListSimulatedUsersResponse": "simulated_users", "Location": "functions", "Location1": "functions", "Location2": "functions", @@ -795,6 +847,7 @@ "OrgAutomation": "org_automations", "OrgAutomationIdParam": "org_automations", "OrgAutomationName": "org_automations", + "OrgId": "organizations", "OrgName": "common", "Organization": "organizations", "OrganizationIdParam": "organizations", @@ -821,6 +874,7 @@ "PatchProjectTag": "project_tags", "PatchPrompt": "prompts", "PatchRole": "roles", + "PatchSimulatedUser": "simulated_users", "PatchSpanIFrame": "span_iframes", "PatchView": "views", "Permission": "common", @@ -905,6 +959,8 @@ "ServiceToken": "service_tokens", "ServiceTokenIdParam": "service_tokens", "ServiceTokenName": "service_tokens", + "SimulatedUser": "simulated_users", + "SimulatedUserVoiceConfig": "simulated_users", "Slug": "common", "Source": "functions", "SourceFacetFunction": "functions", @@ -1019,6 +1075,16 @@ "AddMemberPermission", "AddedUser", "Agent", + "Agent1", + "Agent10", + "Agent2", + "Agent3", + "Agent4", + "Agent5", + "Agent6", + "Agent7", + "Agent8", + "Agent9", "AgentIdParam", "AgentName", "AiSecretIdParam", @@ -1026,6 +1092,7 @@ "ApiKey", "ApiKeyIdParam", "ApiKeyName", + "AppLimit", "AppLimitParam", "AppLimitWithDefaultParam", "AutomationStatus", @@ -1059,18 +1126,22 @@ "Condition", "Config", "Config1", - "Config10", - "Config11", "Config12", "Config13", "Config14", "Config15", "Config16", "Config17", + "Config18", + "Config19", "Config2", + "Config20", + "Config21", "Config3", "Config4", "Config5", + "Config6", + "Config7", "Config8", "Config9", "Context", @@ -1092,8 +1163,11 @@ "CreatePrompt", "CreateRole", "CreateServiceTokenOutput", + "CreateSimulatedUser", "CreateSpanIFrame", "CreateView", + "CreatedAfter", + "CreatedBefore", "Credentials", "Credentials1", "Credentials2", @@ -1180,12 +1254,14 @@ "FunctionData3", "FunctionData4", "FunctionData5", + "FunctionData6", "FunctionDataNullish", "FunctionDataNullish1", "FunctionDataNullish2", "FunctionDataNullish3", "FunctionDataNullish4", "FunctionDataNullish5", + "FunctionDataNullish6", "FunctionIdParam", "FunctionIdRef", "FunctionName", @@ -1204,6 +1280,7 @@ "GetGroupResponse", "GetMcpServerResponse", "GetOrgAutomationResponse", + "GetOrganizationApiKeysResponse", "GetOrganizationResponse", "GetProjectAutomationResponse", "GetProjectGroupResponse", @@ -1243,6 +1320,7 @@ "InternalMetadata", "InviteUsers", "ListEnvironmentsResponse", + "ListSimulatedUsersResponse", "Location", "Location1", "Location2", @@ -1274,6 +1352,7 @@ "OrgAutomation", "OrgAutomationIdParam", "OrgAutomationName", + "OrgId", "OrgName", "Organization", "OrganizationIdParam", @@ -1300,6 +1379,7 @@ "PatchProjectTag", "PatchPrompt", "PatchRole", + "PatchSimulatedUser", "PatchSpanIFrame", "PatchView", "Permission", @@ -1384,6 +1464,8 @@ "ServiceToken", "ServiceTokenIdParam", "ServiceTokenName", + "SimulatedUser", + "SimulatedUserVoiceConfig", "Slug", "Source", "SourceFacetFunction", diff --git a/py/src/braintrust/api/_generated/models/acls.py b/py/src/braintrust/api/_generated/models/acls.py index 4e5ba2c2..f3a93073 100644 --- a/py/src/braintrust/api/_generated/models/acls.py +++ b/py/src/braintrust/api/_generated/models/acls.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/agents.py b/py/src/braintrust/api/_generated/models/agents.py index 53191b8c..fac15c1c 100644 --- a/py/src/braintrust/api/_generated/models/agents.py +++ b/py/src/braintrust/api/_generated/models/agents.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/ai_secrets.py b/py/src/braintrust/api/_generated/models/ai_secrets.py index 757d2cb2..7fe2f350 100644 --- a/py/src/braintrust/api/_generated/models/ai_secrets.py +++ b/py/src/braintrust/api/_generated/models/ai_secrets.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/api_keys.py b/py/src/braintrust/api/_generated/models/api_keys.py index f9ab63b0..3547504c 100644 --- a/py/src/braintrust/api/_generated/models/api_keys.py +++ b/py/src/braintrust/api/_generated/models/api_keys.py @@ -1,66 +1,22 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 50b04c997c9d1bc8a29b0f88d5448dd3d6009b77f60107234e16850d2613df9c +# Content SHA-256: a6ff8a839e4a52e12dc51f99e19540b619be9c779f735f61bbb12d207731eb41 from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict from collections.abc import Mapping, Sequence - -class ApiKey(TypedDict): - created: NotRequired[str | None] - """ - Date of api key creation - """ - expires_at: NotRequired[str | None] - """ - Date at which the API key expires. If null, the key never expires. - """ - id: str - """ - Unique identifier for the api key - """ - name: str - """ - Name of the api key - """ - org_id: NotRequired[str | None] - """ - Unique identifier for the organization - """ - preview_name: str - user_email: NotRequired[str | None] - """ - The user's email - """ - user_family_name: NotRequired[str | None] - """ - Family name of the user - """ - user_given_name: NotRequired[str | None] - """ - Given name of the user - """ - user_id: NotRequired[str | None] - """ - Unique identifier for the user - """ - +from .common import ApiKey ApiKeyIdParam: TypeAlias = str """ ApiKey id """ -ApiKeyName: TypeAlias = str -""" -Name of the api_key to search for -""" - class GetApiKeyResponse(TypedDict): objects: Sequence[ApiKey] diff --git a/py/src/braintrust/api/_generated/models/common.py b/py/src/braintrust/api/_generated/models/common.py index 1f025241..15a80f92 100644 --- a/py/src/braintrust/api/_generated/models/common.py +++ b/py/src/braintrust/api/_generated/models/common.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 2fddc3f55fa4d427dea7849e943539d0435569cb08edefae716ab07953cd3c9c +# Content SHA-256: 306cc0625c03004f4bbf7de1f0b7d3b0979becb48573835f8f0a8ef58ac0c116 from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict @@ -38,11 +38,62 @@ The object type that the ACL applies to """ + +class ApiKey(TypedDict): + created: NotRequired[str | None] + """ + Date of api key creation + """ + expires_at: NotRequired[str | None] + """ + Date at which the API key expires. If null, the key never expires. + """ + id: str + """ + Unique identifier for the api key + """ + name: str + """ + Name of the api key + """ + org_id: NotRequired[str | None] + """ + Unique identifier for the organization + """ + preview_name: str + user_email: NotRequired[str | None] + """ + The user's email + """ + user_family_name: NotRequired[str | None] + """ + Family name of the user + """ + user_given_name: NotRequired[str | None] + """ + Given name of the user + """ + user_id: NotRequired[str | None] + """ + Unique identifier for the user + """ + + +ApiKeyName: TypeAlias = str +""" +Name of the api_key to search for +""" + AppLimitParam: TypeAlias = int | None """ Limit the number of objects to return """ +AppLimitWithDefaultParam: TypeAlias = int | None +""" +Limit the number of objects to return +""" + AutomationStatus: TypeAlias = Literal["active", "paused"] """ Whether the automation is active or paused. diff --git a/py/src/braintrust/api/_generated/models/dataset_snapshots.py b/py/src/braintrust/api/_generated/models/dataset_snapshots.py index d2f4d07b..6250a203 100644 --- a/py/src/braintrust/api/_generated/models/dataset_snapshots.py +++ b/py/src/braintrust/api/_generated/models/dataset_snapshots.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/datasets.py b/py/src/braintrust/api/_generated/models/datasets.py index b2024c33..0d205b5a 100644 --- a/py/src/braintrust/api/_generated/models/datasets.py +++ b/py/src/braintrust/api/_generated/models/datasets.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/env_vars.py b/py/src/braintrust/api/_generated/models/env_vars.py index 5054eae9..1b546dca 100644 --- a/py/src/braintrust/api/_generated/models/env_vars.py +++ b/py/src/braintrust/api/_generated/models/env_vars.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/environments.py b/py/src/braintrust/api/_generated/models/environments.py index 106f128c..05c6a915 100644 --- a/py/src/braintrust/api/_generated/models/environments.py +++ b/py/src/braintrust/api/_generated/models/environments.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/experiments.py b/py/src/braintrust/api/_generated/models/experiments.py index 00c4d3ca..5ba38549 100644 --- a/py/src/braintrust/api/_generated/models/experiments.py +++ b/py/src/braintrust/api/_generated/models/experiments.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: b63fceb63c0efc8e33467412aa215c11ab4f919e7c48f29cdf0ea2d29c9dc8b9 +# Content SHA-256: 181715a83427b5a8cc359cdada178e93a6b8f3d32059ba55ee8aeeaee8a05c0d from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict @@ -12,11 +12,6 @@ from .common import Classification, FieldArrayDeleteItem, Metadata, ObjectReferenceNullish -AppLimitWithDefaultParam: TypeAlias = int | None -""" -Limit the number of objects to return -""" - ComparisonExperimentId: TypeAlias = str """ The experiment to compare against, if summarizing scores and metrics. If omitted, will fall back to the `base_exp_id` stored in the experiment metadata, and then to the most recent experiment run in the same project. Must pass `summarize_scores=true` for this id to be used @@ -224,6 +219,7 @@ class ScoreSummary(TypedDict): "preprocessor", "classifier", "review", + "decision", "question", "log", ] diff --git a/py/src/braintrust/api/_generated/models/functions.py b/py/src/braintrust/api/_generated/models/functions.py index 3850540b..6d726bd3 100644 --- a/py/src/braintrust/api/_generated/models/functions.py +++ b/py/src/braintrust/api/_generated/models/functions.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 04002c71fe10c51256fdf3fadcd561b422c1c63cd5674c4dd626311b12eed113 +# Content SHA-256: 26c8bd1c5793fa6059ce066b30eb054bac772e689c017061bd833587d67b746c from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict @@ -197,6 +197,91 @@ class FieldSchema(TypedDict): ) +class Agent1(TypedDict): + agent_name: str + """ + The name of the LiveKit agent to dispatch + """ + server_url: str + """ + The WebSocket URL of the LiveKit project hosting the agent + """ + type: Literal["livekit"] + + +class Agent2(TypedDict): + phone_number: str + type: Literal["phone"] + + +class Agent3(TypedDict): + type: Literal["sip"] + uri: str + + +class Config6(TypedDict): + agent: Agent1 | Agent2 | Agent3 + initiator: NotRequired[Literal["agent", "simulated_user"]] + """ + Who speaks first in the conversation + """ + modality: NotRequired[Literal["voice"]] + timeout_seconds: NotRequired[int] + """ + Maximum conversation duration in seconds + """ + + +class Agent4(TypedDict): + agent_name: str + """ + The name of the LiveKit agent to dispatch + """ + server_url: str + """ + The WebSocket URL of the LiveKit project hosting the agent + """ + type: Literal["livekit"] + + +class Agent5(TypedDict): + args: NotRequired[Sequence[str]] + """ + Arguments passed to the executable without shell interpretation + """ + command: str + """ + Executable for the ACP agent subprocess, communicating over stdio + """ + cwd: str + """ + Absolute working directory for the ACP session on the execution host + """ + permissions: NotRequired[Literal["deny"]] + """ + Deny ACP permission requests; this does not sandbox the subprocess + """ + type: Literal["acp"] + + +class Config7(TypedDict): + agent: Agent4 | Agent5 + initiator: NotRequired[Literal["agent", "simulated_user"]] + """ + Who speaks first in the conversation + """ + modality: Literal["text"] + timeout_seconds: NotRequired[int] + """ + Maximum conversation duration in seconds + """ + + +class FunctionData6(TypedDict): + config: Config6 | Config7 + type: Literal["simulation"] + + class FunctionDataNullish1(TypedDict): type: Literal["prompt"] @@ -240,6 +325,92 @@ class FunctionDataNullish3(TypedDict): }, ) + +class Agent6(TypedDict): + agent_name: str + """ + The name of the LiveKit agent to dispatch + """ + server_url: str + """ + The WebSocket URL of the LiveKit project hosting the agent + """ + type: Literal["livekit"] + + +class Agent7(TypedDict): + phone_number: str + type: Literal["phone"] + + +class Agent8(TypedDict): + type: Literal["sip"] + uri: str + + +class Config8(TypedDict): + agent: Agent6 | Agent7 | Agent8 + initiator: NotRequired[Literal["agent", "simulated_user"]] + """ + Who speaks first in the conversation + """ + modality: NotRequired[Literal["voice"]] + timeout_seconds: NotRequired[int] + """ + Maximum conversation duration in seconds + """ + + +class Agent9(TypedDict): + agent_name: str + """ + The name of the LiveKit agent to dispatch + """ + server_url: str + """ + The WebSocket URL of the LiveKit project hosting the agent + """ + type: Literal["livekit"] + + +class Agent10(TypedDict): + args: NotRequired[Sequence[str]] + """ + Arguments passed to the executable without shell interpretation + """ + command: str + """ + Executable for the ACP agent subprocess, communicating over stdio + """ + cwd: str + """ + Absolute working directory for the ACP session on the execution host + """ + permissions: NotRequired[Literal["deny"]] + """ + Deny ACP permission requests; this does not sandbox the subprocess + """ + type: Literal["acp"] + + +class Config9(TypedDict): + agent: Agent9 | Agent10 + initiator: NotRequired[Literal["agent", "simulated_user"]] + """ + Who speaks first in the conversation + """ + modality: Literal["text"] + timeout_seconds: NotRequired[int] + """ + Maximum conversation duration in seconds + """ + + +class FunctionDataNullish6(TypedDict): + config: Config8 | Config9 + type: Literal["simulation"] + + FunctionIdParam: TypeAlias = str """ Function id @@ -612,6 +783,7 @@ class GraphData(TypedDict): | BatchedFacetData | FunctionData5 | TopicMapData + | FunctionData6 ) FunctionDataNullish: TypeAlias = ( @@ -624,6 +796,7 @@ class GraphData(TypedDict): | BatchedFacetData | FunctionDataNullish5 | TopicMapData + | FunctionDataNullish6 | None ) diff --git a/py/src/braintrust/api/_generated/models/groups.py b/py/src/braintrust/api/_generated/models/groups.py index 3e7992c7..45a5b113 100644 --- a/py/src/braintrust/api/_generated/models/groups.py +++ b/py/src/braintrust/api/_generated/models/groups.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/mcp_servers.py b/py/src/braintrust/api/_generated/models/mcp_servers.py index d341b95b..ca5dae5f 100644 --- a/py/src/braintrust/api/_generated/models/mcp_servers.py +++ b/py/src/braintrust/api/_generated/models/mcp_servers.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/org_automations.py b/py/src/braintrust/api/_generated/models/org_automations.py index a055effd..b401bba7 100644 --- a/py/src/braintrust/api/_generated/models/org_automations.py +++ b/py/src/braintrust/api/_generated/models/org_automations.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/organizations.py b/py/src/braintrust/api/_generated/models/organizations.py index efb4f51e..f421eb5a 100644 --- a/py/src/braintrust/api/_generated/models/organizations.py +++ b/py/src/braintrust/api/_generated/models/organizations.py @@ -1,20 +1,45 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 417f0291f1b1d2fdf8824dbecf592bf64bd02eec2839fe65a78129bd2f2382d6 +# Content SHA-256: 9eabdfb4de6308d2596d3fbf33c82116616ced60e45ce1f4ce63a84d8ceab594 from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict from collections.abc import Mapping, Sequence +from .common import ApiKey + +CreatedAfter: TypeAlias = str +""" +Include API keys created at or after this timestamp +""" + +CreatedBefore: TypeAlias = str +""" +Include API keys created at or before this timestamp +""" + + +class GetOrganizationApiKeysResponse(TypedDict): + objects: Sequence[ApiKey] + """ + A list of api_key objects + """ + + ImageRenderingMode: TypeAlias = Literal["auto", "click_to_load", "blocked"] | None """ Controls how images are rendered in the UI: 'auto' loads images automatically, 'click_to_load' shows a placeholder until clicked, 'blocked' prevents image loading entirely """ +OrgId: TypeAlias = str +""" +Identify the organization to list API keys for +""" + class Organization(TypedDict): api_url: NotRequired[str | None] @@ -66,7 +91,7 @@ class ServiceAccount(TypedDict): """ token_name: NotRequired[str | None] """ - Optional name of an initial service token to create for the new service account. This is a narrow compatibility carve-out only on PATCH /v1/organization/members. When this field is set, the request must be authenticated with a service token that has organization-owner permissions, not a user API key. + Optional name of an initial service token to create for the new service account. When set, authenticate with a UI session or service token, not a user API key. The caller must own the organization or the project group specified by invite_users.project_group_id. """ @@ -95,6 +120,10 @@ class InviteUsers(TypedDict): """ Ids of existing users to invite """ + project_group_id: NotRequired[str | None] + """ + Grants new service accounts read access to this project group. Required when a project-group Owner creates service accounts. + """ send_invite_emails: NotRequired[bool | None] """ If true, send invite emails to the users who wore actually added diff --git a/py/src/braintrust/api/_generated/models/project_automations.py b/py/src/braintrust/api/_generated/models/project_automations.py index 186d8893..b137e7e1 100644 --- a/py/src/braintrust/api/_generated/models/project_automations.py +++ b/py/src/braintrust/api/_generated/models/project_automations.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 3d8afc143d2352c62f13d90de1bfd2642e92e0231559c4d086a170ae6d8b3bc6 +# Content SHA-256: d7501f95f831646fbaddd2b35f601e14579852d51e8053d5f0353325e8e474a3 from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict @@ -316,7 +316,7 @@ class Action8(TypedDict): """ -class Config8(TypedDict): +class Config12(TypedDict): action: Action6 | Action7 | Action8 """ The action to take when the automation rule is triggered @@ -376,7 +376,7 @@ class ExportDefinition5(TypedDict): type: Literal["btql_query"] -class Config10(TypedDict): +class Config14(TypedDict): batch_size: NotRequired[int | None] """ The maximum number of result rows to write per async query batch @@ -473,7 +473,7 @@ class Action11(TypedDict): """ -class Config12(TypedDict): +class Config16(TypedDict): action: Action9 | Action10 | Action11 """ The action to take when the automation rule is triggered @@ -554,7 +554,7 @@ class Action14(TypedDict): """ -class Config13(TypedDict): +class Config17(TypedDict): action: Action12 | Action13 | Action14 """ The action to take when the automation rule is triggered @@ -614,7 +614,7 @@ class ExportDefinition8(TypedDict): type: Literal["btql_query"] -class Config15(TypedDict): +class Config19(TypedDict): batch_size: NotRequired[int | None] """ The maximum number of result rows to write per async query batch @@ -711,7 +711,7 @@ class Action17(TypedDict): """ -class Config17(TypedDict): +class Config21(TypedDict): action: Action15 | Action16 | Action17 """ The action to take when the automation rule is triggered @@ -994,7 +994,7 @@ class Loop(TypedDict): Write tools that may run without interactive approval """ endpoint_name: NotRequired[str] - harness: NotRequired[Literal["codex", "native", "claude-code"]] + harness: NotRequired[Literal["native", "codex", "claude-code", "pi"]] """ Required when saving a Loop automation. Currently only Codex is supported. """ @@ -1160,7 +1160,7 @@ class Config2(TypedDict): status: NotRequired[AutomationStatus] -class Config9(TypedDict): +class Config13(TypedDict): batch_size: NotRequired[float | None] """ The number of rows to export in each batch @@ -1193,7 +1193,7 @@ class Config9(TypedDict): status: NotRequired[AutomationStatus] -class Config11(TypedDict): +class Config15(TypedDict): event_type: Literal["retention"] """ The type of automation. @@ -1205,7 +1205,7 @@ class Config11(TypedDict): """ -class Config14(TypedDict): +class Config18(TypedDict): batch_size: NotRequired[float | None] """ The number of rows to export in each batch @@ -1238,7 +1238,7 @@ class Config14(TypedDict): status: NotRequired[AutomationStatus] -class Config16(TypedDict): +class Config20(TypedDict): event_type: Literal["retention"] """ The type of automation. @@ -1322,11 +1322,11 @@ class CreateProjectAutomation(TypedDict): class PatchProjectAutomation(TypedDict): config: NotRequired[ - Config8 - | Config9 - | Config10 - | Config11 - | Config12 + Config12 + | Config13 + | Config14 + | Config15 + | Config16 | WindowedAutomationConfig | TopicAutomationConfig | TopicDigestAutomationConfig @@ -1347,11 +1347,11 @@ class PatchProjectAutomation(TypedDict): class ProjectAutomation(TypedDict): config: ( - Config13 - | Config14 - | Config15 - | Config16 - | Config17 + Config17 + | Config18 + | Config19 + | Config20 + | Config21 | WindowedAutomationConfig | TopicAutomationConfig | TopicDigestAutomationConfig diff --git a/py/src/braintrust/api/_generated/models/project_groups.py b/py/src/braintrust/api/_generated/models/project_groups.py index dcab9cfb..68716f82 100644 --- a/py/src/braintrust/api/_generated/models/project_groups.py +++ b/py/src/braintrust/api/_generated/models/project_groups.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/project_scores.py b/py/src/braintrust/api/_generated/models/project_scores.py index 35626c8a..bfc71514 100644 --- a/py/src/braintrust/api/_generated/models/project_scores.py +++ b/py/src/braintrust/api/_generated/models/project_scores.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/project_tags.py b/py/src/braintrust/api/_generated/models/project_tags.py index b5a7e328..c9316f82 100644 --- a/py/src/braintrust/api/_generated/models/project_tags.py +++ b/py/src/braintrust/api/_generated/models/project_tags.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/projects.py b/py/src/braintrust/api/_generated/models/projects.py index 79066722..69fa4c35 100644 --- a/py/src/braintrust/api/_generated/models/projects.py +++ b/py/src/braintrust/api/_generated/models/projects.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/prompts.py b/py/src/braintrust/api/_generated/models/prompts.py index c5342e93..367fef9c 100644 --- a/py/src/braintrust/api/_generated/models/prompts.py +++ b/py/src/braintrust/api/_generated/models/prompts.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/roles.py b/py/src/braintrust/api/_generated/models/roles.py index 1a5940f1..a89bc6e5 100644 --- a/py/src/braintrust/api/_generated/models/roles.py +++ b/py/src/braintrust/api/_generated/models/roles.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/service_tokens.py b/py/src/braintrust/api/_generated/models/service_tokens.py index 5e73052b..4940bac7 100644 --- a/py/src/braintrust/api/_generated/models/service_tokens.py +++ b/py/src/braintrust/api/_generated/models/service_tokens.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/simulated_users.py b/py/src/braintrust/api/_generated/models/simulated_users.py new file mode 100644 index 00000000..564a5a2d --- /dev/null +++ b/py/src/braintrust/api/_generated/models/simulated_users.py @@ -0,0 +1,95 @@ +# Generated by scripts/generate-api-client.py. DO NOT EDIT. +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 +# datamodel-code-generator: 0.81.0 +# ruff: 0.15.21 +# Generator Python: 3.14 +# Content SHA-256: b921d972bc5b8454e61ddfc55af6c30f1a433b7d0eb43c2b8343f872fde308b7 + +from typing_extensions import NotRequired +from typing import Any, Literal, TypeAlias, TypedDict +from collections.abc import Mapping, Sequence + +AppLimit: TypeAlias = int | None +""" +Limit the number of objects to return +""" + + +class SimulatedUserVoiceConfig(TypedDict): + accent: NotRequired[str] + language: NotRequired[str] + speaking_rate: NotRequired[float] + voice_id: str + + +class CreateSimulatedUser(TypedDict): + goal: NotRequired[str] + """ + The simulated user's objective, used to decide when to end the conversation + """ + instructions: str + """ + The simulated user's role, scenario, and behavior + """ + name: str + """ + Name of the simulated user + """ + voice_config: SimulatedUserVoiceConfig + + +class PatchSimulatedUser(TypedDict): + goal: NotRequired[str | None] + """ + The simulated user's objective. Set to null to clear it. + """ + instructions: NotRequired[str] + """ + The simulated user's role, scenario, and behavior + """ + name: NotRequired[str] + """ + Name of the simulated user + """ + voice_config: NotRequired[SimulatedUserVoiceConfig] + + +class SimulatedUser(TypedDict): + _xact_id: NotRequired[str] + """ + Legacy transaction id. Not returned by simulated user CRUD. + """ + created: NotRequired[str | None] + """ + Date of simulated user creation + """ + goal: NotRequired[str] + """ + The simulated user's objective, used to decide when to end the conversation + """ + id: str + """ + Unique identifier for the simulated user + """ + instructions: str + """ + The simulated user's role, scenario, and behavior + """ + name: str + """ + Name of the simulated user + """ + org_id: str + """ + Unique identifier for the organization + """ + project_id: str + """ + Unique identifier for the project that the simulated user belongs under + """ + voice_config: SimulatedUserVoiceConfig + + +class ListSimulatedUsersResponse(TypedDict): + objects: Sequence[SimulatedUser] diff --git a/py/src/braintrust/api/_generated/models/span_iframes.py b/py/src/braintrust/api/_generated/models/span_iframes.py index cee760a8..3842f849 100644 --- a/py/src/braintrust/api/_generated/models/span_iframes.py +++ b/py/src/braintrust/api/_generated/models/span_iframes.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/users.py b/py/src/braintrust/api/_generated/models/users.py index 6d4e0b77..948eb4da 100644 --- a/py/src/braintrust/api/_generated/models/users.py +++ b/py/src/braintrust/api/_generated/models/users.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/models/views.py b/py/src/braintrust/api/_generated/models/views.py index 2c20d322..9cf3e916 100644 --- a/py/src/braintrust/api/_generated/models/views.py +++ b/py/src/braintrust/api/_generated/models/views.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 18b06b6a0abde14a1b6f68cc74b4e9ab16ad24a4fbf8b7fadc71bffd3f29ae0f +# Content SHA-256: 7dc46649bead52e61e7008d64db4eb13165df547af0b201ac6769d9288b6460c from typing_extensions import NotRequired from typing import Any, Literal, TypeAlias, TypedDict @@ -41,6 +41,7 @@ class ViewDataSearch(TypedDict): class Options(TypedDict): chartVisibility: NotRequired[Mapping[str, bool] | None] + filterScope: NotRequired[Literal["span", "trace"]] frameEnd: NotRequired[str | None] frameStart: NotRequired[str | None] groupBy: NotRequired[str | None] diff --git a/py/src/braintrust/api/_generated/org_automations.py b/py/src/braintrust/api/_generated/org_automations.py index 8593dcef..7eeb3126 100644 --- a/py/src/braintrust/api/_generated/org_automations.py +++ b/py/src/braintrust/api/_generated/org_automations.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/organizations.py b/py/src/braintrust/api/_generated/organizations.py index 8c16efc8..a13c2914 100644 --- a/py/src/braintrust/api/_generated/organizations.py +++ b/py/src/braintrust/api/_generated/organizations.py @@ -1,10 +1,10 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 -# Content SHA-256: 584a9ceaf40b36bdc383bac62d0942c96ccc17323e702ebb931b188234eef88e +# Content SHA-256: 07cdc16d5d76af13e706160da674ec10fab056826a0aaa0f5ab44a9764e63f1c """Generated Organizations REST operations and resource.""" @@ -12,9 +12,21 @@ from .._service import Operation, Parameter, ResourceAPI from ..policies import RetryMode -from .models.common import AppLimitParam, EndingBefore, Ids, OrgName, StartingAfter +from .models.common import ( + ApiKeyName, + AppLimitParam, + AppLimitWithDefaultParam, + EndingBefore, + Ids, + OrgName, + StartingAfter, +) from .models.organizations import ( + CreatedAfter, + CreatedBefore, + GetOrganizationApiKeysResponse, GetOrganizationResponse, + OrgId, Organization, OrganizationIdParam, PatchOrganization, @@ -116,11 +128,73 @@ ) +GET_ORGANIZATION_API_KEYS = Operation( + operation_id="getOrganizationApiKeys", + method="GET", + path="/v1/organization/api_keys", + parameters=( + Parameter( + argument_name="limit", + name="limit", + location="query", + required=False, + ), + Parameter( + argument_name="starting_after", + name="starting_after", + location="query", + required=False, + ), + Parameter( + argument_name="ending_before", + name="ending_before", + location="query", + required=False, + ), + Parameter( + argument_name="ids", + name="ids", + location="query", + required=False, + ), + Parameter( + argument_name="api_key_name", + name="api_key_name", + location="query", + required=False, + ), + Parameter( + argument_name="org_id", + name="org_id", + location="query", + required=False, + ), + Parameter( + argument_name="created_after", + name="created_after", + location="query", + required=False, + ), + Parameter( + argument_name="created_before", + name="created_before", + location="query", + required=False, + ), + ), + has_request_body=False, + success_statuses=(200,), + json_success_statuses=(200,), + retry_mode=RetryMode.SAFE_READ, +) + + OPERATIONS = { "getOrganization": GET_ORGANIZATION, "getOrganizationId": GET_ORGANIZATION_ID, "patchOrganizationId": PATCH_ORGANIZATION_ID, "patchOrganizationMembers": PATCH_ORGANIZATION_MEMBERS, + "getOrganizationApiKeys": GET_ORGANIZATION_API_KEYS, } @@ -189,3 +263,32 @@ def patch_organization_members( body=body, ), ) + + def get_organization_api_keys( + self, + *, + limit: "AppLimitWithDefaultParam | None" = None, + starting_after: "StartingAfter | None" = None, + ending_before: "EndingBefore | None" = None, + ids: "Ids | None" = None, + api_key_name: "ApiKeyName | None" = None, + org_id: "OrgId | None" = None, + created_after: "CreatedAfter | None" = None, + created_before: "CreatedBefore | None" = None, + ) -> "GetOrganizationApiKeysResponse": + return cast( + "GetOrganizationApiKeysResponse", + self.execute( + GET_ORGANIZATION_API_KEYS, + query_parameters={ + "limit": limit, + "starting_after": starting_after, + "ending_before": ending_before, + "ids": ids, + "api_key_name": api_key_name, + "org_id": org_id, + "created_after": created_after, + "created_before": created_before, + }, + ), + ) diff --git a/py/src/braintrust/api/_generated/project_automations.py b/py/src/braintrust/api/_generated/project_automations.py index f6378efa..aeb313f7 100644 --- a/py/src/braintrust/api/_generated/project_automations.py +++ b/py/src/braintrust/api/_generated/project_automations.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/project_groups.py b/py/src/braintrust/api/_generated/project_groups.py index 56241d0d..a6f1367b 100644 --- a/py/src/braintrust/api/_generated/project_groups.py +++ b/py/src/braintrust/api/_generated/project_groups.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/project_scores.py b/py/src/braintrust/api/_generated/project_scores.py index 73f90034..64dafe1a 100644 --- a/py/src/braintrust/api/_generated/project_scores.py +++ b/py/src/braintrust/api/_generated/project_scores.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/project_tags.py b/py/src/braintrust/api/_generated/project_tags.py index 5f1b6315..4c0c7217 100644 --- a/py/src/braintrust/api/_generated/project_tags.py +++ b/py/src/braintrust/api/_generated/project_tags.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/projects.py b/py/src/braintrust/api/_generated/projects.py index e6f52548..a57ff8fd 100644 --- a/py/src/braintrust/api/_generated/projects.py +++ b/py/src/braintrust/api/_generated/projects.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/prompts.py b/py/src/braintrust/api/_generated/prompts.py index e8d623eb..d46181ce 100644 --- a/py/src/braintrust/api/_generated/prompts.py +++ b/py/src/braintrust/api/_generated/prompts.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/roles.py b/py/src/braintrust/api/_generated/roles.py index 2625bc51..29c07257 100644 --- a/py/src/braintrust/api/_generated/roles.py +++ b/py/src/braintrust/api/_generated/roles.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/service_tokens.py b/py/src/braintrust/api/_generated/service_tokens.py index e8410b7b..0cc3b786 100644 --- a/py/src/braintrust/api/_generated/service_tokens.py +++ b/py/src/braintrust/api/_generated/service_tokens.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/simulated_users.py b/py/src/braintrust/api/_generated/simulated_users.py new file mode 100644 index 00000000..8ec35e87 --- /dev/null +++ b/py/src/braintrust/api/_generated/simulated_users.py @@ -0,0 +1,262 @@ +# Generated by scripts/generate-api-client.py. DO NOT EDIT. +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 +# datamodel-code-generator: 0.81.0 +# ruff: 0.15.21 +# Generator Python: 3.14 +# Content SHA-256: ac2436e88dfc593088f6aa2aa0014cf441e8e5f4a4f5d0f20bf79ddc449eb467 + +"""Generated Simulated users REST operations and resource.""" + +from collections.abc import Sequence + +from typing import cast + +from .._service import Operation, Parameter, ResourceAPI +from ..policies import RetryMode +from .models.common import EndingBefore, StartingAfter +from .models.simulated_users import ( + AppLimit, + CreateSimulatedUser, + ListSimulatedUsersResponse, + PatchSimulatedUser, + SimulatedUser, +) + + +LIST_SIMULATED_USERS = Operation( + operation_id="listSimulatedUsers", + method="GET", + path="/v1/project/{project_id}/simulated_user", + parameters=( + Parameter( + argument_name="project_id", + name="project_id", + location="path", + required=True, + ), + Parameter( + argument_name="ids", + name="ids", + location="query", + required=False, + ), + Parameter( + argument_name="simulated_user_name", + name="simulated_user_name", + location="query", + required=False, + ), + Parameter( + argument_name="limit", + name="limit", + location="query", + required=False, + ), + Parameter( + argument_name="starting_after", + name="starting_after", + location="query", + required=False, + ), + Parameter( + argument_name="ending_before", + name="ending_before", + location="query", + required=False, + ), + ), + has_request_body=False, + success_statuses=(200,), + json_success_statuses=(200,), + retry_mode=RetryMode.SAFE_READ, +) + + +CREATE_SIMULATED_USER = Operation( + operation_id="createSimulatedUser", + method="POST", + path="/v1/project/{project_id}/simulated_user", + parameters=( + Parameter( + argument_name="project_id", + name="project_id", + location="path", + required=True, + ), + ), + has_request_body=True, + success_statuses=(200,), + json_success_statuses=(200,), + retry_mode=RetryMode.NONE, +) + + +GET_SIMULATED_USER = Operation( + operation_id="getSimulatedUser", + method="GET", + path="/v1/project/{project_id}/simulated_user/{id}", + parameters=( + Parameter( + argument_name="project_id", + name="project_id", + location="path", + required=True, + ), + Parameter( + argument_name="id", + name="id", + location="path", + required=True, + ), + ), + has_request_body=False, + success_statuses=(200,), + json_success_statuses=(200,), + retry_mode=RetryMode.SAFE_READ, +) + + +PATCH_SIMULATED_USER = Operation( + operation_id="patchSimulatedUser", + method="PATCH", + path="/v1/project/{project_id}/simulated_user/{id}", + parameters=( + Parameter( + argument_name="project_id", + name="project_id", + location="path", + required=True, + ), + Parameter( + argument_name="id", + name="id", + location="path", + required=True, + ), + ), + has_request_body=True, + success_statuses=(200,), + json_success_statuses=(200,), + retry_mode=RetryMode.NONE, +) + + +DELETE_SIMULATED_USER = Operation( + operation_id="deleteSimulatedUser", + method="DELETE", + path="/v1/project/{project_id}/simulated_user/{id}", + parameters=( + Parameter( + argument_name="project_id", + name="project_id", + location="path", + required=True, + ), + Parameter( + argument_name="id", + name="id", + location="path", + required=True, + ), + ), + has_request_body=False, + success_statuses=(200,), + json_success_statuses=(200,), + retry_mode=RetryMode.NONE, +) + + +OPERATIONS = { + "listSimulatedUsers": LIST_SIMULATED_USERS, + "createSimulatedUser": CREATE_SIMULATED_USER, + "getSimulatedUser": GET_SIMULATED_USER, + "patchSimulatedUser": PATCH_SIMULATED_USER, + "deleteSimulatedUser": DELETE_SIMULATED_USER, +} + + +class SimulatedUsersAPI(ResourceAPI): + """Generated Simulated users REST API.""" + + def list_simulated_users( + self, + project_id: "str", + *, + ids: "str | Sequence[str] | None" = None, + simulated_user_name: "str | None" = None, + limit: "AppLimit | None" = None, + starting_after: "StartingAfter | None" = None, + ending_before: "EndingBefore | None" = None, + ) -> "ListSimulatedUsersResponse": + return cast( + "ListSimulatedUsersResponse", + self.execute( + LIST_SIMULATED_USERS, + path_parameters={"project_id": project_id}, + query_parameters={ + "ids": ids, + "simulated_user_name": simulated_user_name, + "limit": limit, + "starting_after": starting_after, + "ending_before": ending_before, + }, + ), + ) + + def create_simulated_user( + self, + project_id: "str", + *, + body: "CreateSimulatedUser", + ) -> "SimulatedUser": + return cast( + "SimulatedUser", + self.execute( + CREATE_SIMULATED_USER, + path_parameters={"project_id": project_id}, + body=body, + ), + ) + + def get_simulated_user( + self, + project_id: "str", + id: "str", + ) -> "SimulatedUser": + return cast( + "SimulatedUser", + self.execute( + GET_SIMULATED_USER, + path_parameters={"project_id": project_id, "id": id}, + ), + ) + + def patch_simulated_user( + self, + project_id: "str", + id: "str", + *, + body: "PatchSimulatedUser", + ) -> "SimulatedUser": + return cast( + "SimulatedUser", + self.execute( + PATCH_SIMULATED_USER, + path_parameters={"project_id": project_id, "id": id}, + body=body, + ), + ) + + def delete_simulated_user( + self, + project_id: "str", + id: "str", + ) -> "SimulatedUser": + return cast( + "SimulatedUser", + self.execute( + DELETE_SIMULATED_USER, + path_parameters={"project_id": project_id, "id": id}, + ), + ) diff --git a/py/src/braintrust/api/_generated/span_iframes.py b/py/src/braintrust/api/_generated/span_iframes.py index c1f8b318..450c5368 100644 --- a/py/src/braintrust/api/_generated/span_iframes.py +++ b/py/src/braintrust/api/_generated/span_iframes.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/users.py b/py/src/braintrust/api/_generated/users.py index fb09a6b0..97000994 100644 --- a/py/src/braintrust/api/_generated/users.py +++ b/py/src/braintrust/api/_generated/users.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/_generated/views.py b/py/src/braintrust/api/_generated/views.py index 8ef6f129..f3e567e0 100644 --- a/py/src/braintrust/api/_generated/views.py +++ b/py/src/braintrust/api/_generated/views.py @@ -1,6 +1,6 @@ # Generated by scripts/generate-api-client.py. DO NOT EDIT. -# OpenAPI commit: e53363ed2c1530a53b68872433f68844dceaad1b -# OpenAPI spec SHA-256: e5be7d758587038ebe330354f7a5337645f9bd3b2c7bffa46b5f6dcaea056478 +# OpenAPI commit: 161c77c73c0bc65ef3f4bb9cbd7f9f7deaa9fe23 +# OpenAPI spec SHA-256: aa86a5dee6e9a2fd757cbd0106eac71a0ef585c003b5378c9d3054bcaeff3a68 # datamodel-code-generator: 0.81.0 # ruff: 0.15.21 # Generator Python: 3.14 diff --git a/py/src/braintrust/api/client.py b/py/src/braintrust/api/client.py index 54041f92..369830f7 100644 --- a/py/src/braintrust/api/client.py +++ b/py/src/braintrust/api/client.py @@ -36,6 +36,7 @@ from ._generated.prompts import PromptsAPI from ._generated.roles import RolesAPI from ._generated.service_tokens import ServiceTokensAPI + from ._generated.simulated_users import SimulatedUsersAPI from ._generated.span_iframes import SpanIframesAPI from ._generated.users import UsersAPI from ._generated.views import ViewsAPI @@ -333,6 +334,12 @@ def service_tokens(self) -> "ServiceTokensAPI": return self._service("service_tokens", ServiceTokensAPI) + @property + def simulated_users(self) -> "SimulatedUsersAPI": + from ._generated.simulated_users import SimulatedUsersAPI + + return self._service("simulated_users", SimulatedUsersAPI) + @property def span_iframes(self) -> "SpanIframesAPI": from ._generated.span_iframes import SpanIframesAPI diff --git a/py/src/braintrust/api/test_generated_models.py b/py/src/braintrust/api/test_generated_models.py index b458e364..e76ea595 100644 --- a/py/src/braintrust/api/test_generated_models.py +++ b/py/src/braintrust/api/test_generated_models.py @@ -29,6 +29,7 @@ "prompts", "roles", "service_tokens", + "simulated_users", "span_iframes", "users", "views", diff --git a/py/src/braintrust/api/types/__init__.py b/py/src/braintrust/api/types/__init__.py index cf8b2fba..2d534f8d 100644 --- a/py/src/braintrust/api/types/__init__.py +++ b/py/src/braintrust/api/types/__init__.py @@ -27,6 +27,7 @@ CreatePrompt, CreateRole, CreateServiceTokenOutput, + CreateSimulatedUser, CreateSpanIFrame, CreateView, Dataset, @@ -55,6 +56,7 @@ GetFunctionResponse, GetGroupResponse, GetMcpServerResponse, + GetOrganizationApiKeysResponse, GetOrganizationResponse, GetOrgAutomationResponse, GetProjectAutomationResponse, @@ -73,6 +75,7 @@ InsertEventsResponse, InsertExperimentEventRequest, ListEnvironmentsResponse, + ListSimulatedUsersResponse, MCPServer, Organization, OrgAutomation, @@ -96,6 +99,7 @@ PatchProjectTag, PatchPrompt, PatchRole, + PatchSimulatedUser, PatchSpanIFrame, PatchView, Project, @@ -106,6 +110,7 @@ Prompt, Role, ServiceToken, + SimulatedUser, SpanIFrame, SummarizeDatasetResponse, SummarizeExperimentResponse, @@ -141,6 +146,7 @@ "CreatePrompt", "CreateRole", "CreateServiceTokenOutput", + "CreateSimulatedUser", "CreateSpanIFrame", "CreateView", "Dataset", @@ -170,6 +176,7 @@ "GetGroupResponse", "GetMcpServerResponse", "GetOrgAutomationResponse", + "GetOrganizationApiKeysResponse", "GetOrganizationResponse", "GetProjectAutomationResponse", "GetProjectGroupResponse", @@ -187,6 +194,7 @@ "InsertEventsResponse", "InsertExperimentEventRequest", "ListEnvironmentsResponse", + "ListSimulatedUsersResponse", "MCPServer", "OrgAutomation", "Organization", @@ -210,6 +218,7 @@ "PatchProjectTag", "PatchPrompt", "PatchRole", + "PatchSimulatedUser", "PatchSpanIFrame", "PatchView", "Project", @@ -220,6 +229,7 @@ "Prompt", "Role", "ServiceToken", + "SimulatedUser", "SpanIFrame", "SummarizeDatasetResponse", "SummarizeExperimentResponse", diff --git a/py/src/braintrust/type_tests/test_api_client.py b/py/src/braintrust/type_tests/test_api_client.py index 79943540..63297cf9 100644 --- a/py/src/braintrust/type_tests/test_api_client.py +++ b/py/src/braintrust/type_tests/test_api_client.py @@ -58,6 +58,7 @@ openapi_client.project_tags.get_project_tag() openapi_client.roles.get_role() openapi_client.service_tokens.get_service_token() + openapi_client.simulated_users.list_simulated_users("project-id") openapi_client.span_iframes.get_span_iframe() openapi_client.users.get_user() openapi_client.views.get_view_id("view-id", "project", "project-id")