From d463b60c01cc1011fd7ea656b876e07e86eb0066 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 Jul 2026 10:45:34 +0000 Subject: [PATCH] chore: refresh LangSmith platform OpenAPI spec Automated refresh from api.smith.langchain.com with fleet and internal endpoints filtered for public documentation. --- src/langsmith/langsmith-platform-openapi.json | 337 +++++++++++++++++- 1 file changed, 324 insertions(+), 13 deletions(-) diff --git a/src/langsmith/langsmith-platform-openapi.json b/src/langsmith/langsmith-platform-openapi.json index 47adfe72f4..ff349e4eba 100644 --- a/src/langsmith/langsmith-platform-openapi.json +++ b/src/langsmith/langsmith-platform-openapi.json @@ -25951,7 +25951,7 @@ "Bearer Auth": [] } ], - "description": "Lists all commits for a repository with pagination support.\nThis endpoint supports both authenticated and unauthenticated access.\nAuthenticated users can access private repos, while unauthenticated users can only access public repos.\nThe include_stats parameter controls whether download and view statistics are computed (defaults to true).", + "description": "List commits for a repository, with pagination support.\nThis endpoint supports both authenticated and unauthenticated access.\nAuthenticated users can access private repositories; unauthenticated users can only access public repositories.\nThe include_stats parameter controls whether download and view statistics are computed (defaults to true).", "tags": [ "commits" ], @@ -25992,8 +25992,8 @@ "schema": { "default": 20, "minimum": 1, - "maximum": 100, "type": "integer", + "maximum": 100, "title": "Limit" } }, @@ -26293,7 +26293,7 @@ "x-public": true } }, - "/v1/platform/datasets/{dataset_id}/experiment-view-overrides": { + "/datasets/{dataset_id}/experiment-view-overrides": { "get": { "security": [ { @@ -26526,7 +26526,7 @@ } } }, - "/v1/platform/datasets/{dataset_id}/experiment-view-overrides/{id}": { + "/datasets/{dataset_id}/experiment-view-overrides/{id}": { "get": { "security": [ { @@ -27860,6 +27860,125 @@ } } }, + "/orgs/current/data-planes/{id}": { + "delete": { + "security": [ + { + "API Key": [] + }, + { + "Organization ID": [] + }, + { + "Bearer Auth": [] + } + ], + "description": "Verifies that the stored customer AWS role has delete permissions, removes linked workspaces, and starts asynchronous deprovisioning for a data plane owned by the caller's organization. Requires BYOC to be enabled for the org and org admin permissions.", + "tags": [ + "data_planes" + ], + "summary": "Delete a data plane", + "parameters": [ + { + "description": "Data plane ID", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "Data plane deprovisioning started", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/data_planes.PublicDataPlane" + } + } + } + }, + "400": { + "description": "Invalid data plane ID or confirmed missing delete permissions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/data_planes.ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "BYOC not enabled or insufficient permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Data plane not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Data plane is already in a terminal status", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + }, + "x-public": true + } + }, "/repos/{owner}/{repo}/tags/{tag_name}/history": { "get": { "security": [ @@ -27912,8 +28031,8 @@ "schema": { "default": 50, "minimum": 1, - "maximum": 100, "type": "integer", + "maximum": 100, "title": "Limit" } }, @@ -31577,7 +31696,7 @@ "Bearer Auth": [] } ], - "description": "Returns every gateway policy in the current organization.\nThe response includes both admin-created policies and\nruntime-materialized children of `default_spend_cap`\npolicies (children carry `parent_policy_id`).\n\n**Spend tracking:** each spend-cap policy carries\n`current_spend_usd` — the spend accumulated in the policy's\nactive window.\n\n**Filters** (all optional):\n- `policy_type` — `spend_cap`, `default_spend_cap`, `guard`, or `route_config`\n- `subject_matcher_key` + `subject_matcher_value` — narrow to\npolicies whose subject_matchers contain `{key, value}`\n\nFor batch lookups by a set of subject values (e.g. many\nrun_rule_ids at once), use POST\n`/v1/platform/gateway-policies/search`; it accepts the\nvalues in a JSON body and avoids the URL-length ceiling\nthat a repeated query param would hit at scale.", + "description": "Returns every gateway policy in the current organization.\nThe response includes both admin-created policies and\nruntime-materialized children of `default_spend_cap` and\n`default_rate_limit` policies (children carry `parent_policy_id`).\n\n**Spend tracking:** each spend-cap policy carries\n`current_spend_usd` — the spend accumulated in the policy's\nactive window.\n\n**Filters** (all optional):\n- `policy_type` — `spend_cap`, `default_spend_cap`, `guard`, `route_config`, `rate_limit`, or `default_rate_limit`\n- `subject_matcher_key` + `subject_matcher_value` — narrow to\npolicies whose subject_matchers contain `{key, value}`\n\nFor batch lookups by a set of subject values (e.g. many\nrun_rule_ids at once), use POST\n`/v1/platform/gateway-policies/search`; it accepts the\nvalues in a JSON body and avoids the URL-length ceiling\nthat a repeated query param would hit at scale.", "tags": [ "gateway-policies" ], @@ -31667,7 +31786,7 @@ "Bearer Auth": [] } ], - "description": "Creates a gateway policy for the calling organization.\n\n**policy_type** is one of `spend_cap`, `default_spend_cap`,\n`guard`, or `route_config`. The shape of `config` depends on policy_type:\n- `spend_cap` / `default_spend_cap`:\n`{\"window\": \"hourly\"|\"daily\"|\"weekly\"|\"monthly\", \"limit_usd\": }`\n- `guard`:\n`{\"version\": 1, \"detect\": {\"pii\": , \"secrets\": }, \"timeout_seconds\": , \"timeout_action\": \"allow\"|\"block\"}`\n`timeout_seconds` (optional, 0.1–30) caps guard pipeline execution time; defaults to 2s. `timeout_action` defaults to `allow`.\n- `route_config`:\n`{\"strategy\": \"priority_fallback\", \"triggers\": {\"status_codes\": []}, \"fallbacks\": [{\"model_configs\": [{\"model_config_id\": \"\"}]}]}`\n`triggers` is required, with no default: `status_codes` must be a non-empty list (include 502 and 504 for upstream transport failures). `fallbacks` contains an entry whose `model_configs` are tried in priority order (1–5). `subject_matchers` must be a single `workspace_id` entry.\n\n**subject_matchers** is a list of `{key, value}` pairs.\n`key` is one of `organization_id`, `workspace_id`, `user_id`,\n`api_key_id`, or `run_rule_id`. Multiple matchers AND together. A\n`default_spend_cap` uses `{key, value: \"\"}` so the runtime\nmaterializes a per-subject child for every distinct subject\nof that kind it sees in request metadata.\n\n**action** is currently always `block`. Spend caps reject the\nrequest with 402 when the limit is hit; guard policies redact\nmatched content in-place before forwarding upstream.\n\n**Upsert by matchers:** for `spend_cap`, `default_spend_cap`, and\n`guard`, if a policy with the same `subject_matchers` already exists\nin this organization, the existing policy is updated in place instead\nof a duplicate being created. `id` is preserved. `route_config` does\nnot upsert by matchers — name must be unique per organization (409 on\nconflict). Returns 201 either way.", + "description": "Creates a gateway policy for the calling organization.\n\n**policy_type** is one of `spend_cap`, `default_spend_cap`,\n`guard`, `route_config`, `rate_limit`, or `default_rate_limit`.\nThe shape of `config` depends on policy_type:\n- `spend_cap` / `default_spend_cap`:\n`{\"window\": \"hourly\"|\"daily\"|\"weekly\"|\"monthly\", \"limit_usd\": }`\n- `guard`:\n`{\"version\": 1, \"detect\": {\"pii\": , \"secrets\": }, \"timeout_seconds\": , \"timeout_action\": \"allow\"|\"block\"}`\n`timeout_seconds` (optional, 0.1–30) caps guard pipeline execution time; defaults to 2s. `timeout_action` defaults to `allow`.\n- `route_config`:\n`{\"strategy\": \"priority_fallback\", \"triggers\": {\"status_codes\": []}, \"fallbacks\": [{\"model_configs\": [{\"model_config_id\": \"\"}]}]}`\n`triggers` is required, with no default: `status_codes` must be a non-empty list (include 502 and 504 for upstream transport failures). `fallbacks` contains an entry whose `model_configs` are tried in priority order (1–5). `subject_matchers` must be a single `workspace_id` entry.\n- `rate_limit` / `default_rate_limit`:\n`{\"version\": 1, \"limits\": [{\"metric\": \"requests\"|\"tokens\", \"window\": \"minute\"|\"hour\", \"value\": }]}`\n`limits` must be non-empty; each `metric`/`window` pair may appear at most once. `value` is 1..1000000000000000.\n\n**subject_matchers** is a list of `{key, value}` pairs.\n`key` is one of `organization_id`, `workspace_id`, `user_id`,\n`api_key_id`, or `run_rule_id`. Multiple matchers AND together. A\n`default_spend_cap` or `default_rate_limit` uses `{key, value: \"\"}`\nso the runtime materializes a per-subject child for every distinct\nsubject of that kind it sees in request metadata.\n\n**action** is currently always `block`. Spend caps reject the\nrequest with 402 when the limit is hit; rate limits reject with\n429 (with a `Retry-After` hint) when a limit is exceeded; guard\npolicies redact matched content in-place before forwarding upstream.\n\n**Upsert by matchers:** for `spend_cap`, `default_spend_cap`,\n`rate_limit`, `default_rate_limit`, and `guard`, if a policy with\nthe same `subject_matchers` already exists in this organization,\nthe existing policy is updated in place instead of a duplicate\nbeing created. `id` is preserved. `route_config` does not upsert\nby matchers — name must be unique per organization (409 on\nconflict). Returns 201 either way.", "tags": [ "gateway-policies" ], @@ -31949,7 +32068,7 @@ "Bearer Auth": [] } ], - "description": "Deletes a gateway policy. Subsequent reads return 404.\n\n**default_spend_cap cascade:** deleting a `default_spend_cap`\nalso deletes every child policy materialized from it.", + "description": "Deletes a gateway policy. Subsequent reads return 404.\n\n**default cascade:** deleting a `default_spend_cap` or\n`default_rate_limit` also deletes every child policy\nmaterialized from it.", "tags": [ "gateway-policies" ], @@ -32032,7 +32151,7 @@ "Bearer Auth": [] } ], - "description": "Partially updates a gateway policy. Only fields present in\nthe request body are applied; absent fields are left\nunchanged. `policy_type` is immutable — to change a\npolicy's type, delete it and create a new one.\n\n**config** if supplied must match the policy's type:\n- spend-cap: `{\"window\": ..., \"limit_usd\": ...}`\n- guard: `{\"version\": 1, \"detect\": {...}, \"timeout_seconds\": , \"timeout_action\": \"allow\"|\"block\"}`\nMismatched shapes are rejected with 400.\n\n**default_spend_cap cascade:** editing a `default_spend_cap`\nupdates the config/action/enabled/priority on every\nattached child policy so the template stays the source of\ntruth across rollouts.", + "description": "Partially updates a gateway policy. Only fields present in\nthe request body are applied; absent fields are left\nunchanged. `policy_type` is immutable — to change a\npolicy's type, delete it and create a new one.\n\n**config** if supplied must match the policy's type:\n- spend-cap: `{\"window\": ..., \"limit_usd\": ...}`\n- guard: `{\"version\": 1, \"detect\": {...}, \"timeout_seconds\": , \"timeout_action\": \"allow\"|\"block\"}`\n- rate-limit: `{\"version\": 1, \"limits\": [{\"metric\": \"requests\"|\"tokens\", \"window\": \"minute\"|\"hour\", \"value\": }]}`\nMismatched shapes are rejected with 400.\n\n**default cascade:** editing a `default_spend_cap` or\n`default_rate_limit` updates the config/action/enabled/priority\non every attached child policy so the template stays the source\nof truth across rollouts.", "tags": [ "gateway-policies" ], @@ -32131,6 +32250,11 @@ "label": "guard", "lang": "json", "source": "{\n \"config\": {\"version\": 1, \"detect\": {\"pii\": true, \"secrets\": true}, \"timeout_seconds\": 5},\n \"enabled\": true\n}" + }, + { + "label": "rate_limit", + "lang": "json", + "source": "{\n \"config\": {\"version\": 1, \"limits\": [{\"metric\": \"requests\", \"window\": \"minute\", \"value\": 100}]},\n \"enabled\": true\n}" } ], "x-public": true, @@ -37231,7 +37355,7 @@ "Tenant ID": [] } ], - "description": "**Alpha:** The request and response contract may change;\nReturns one run by ID for the given session and start_time. Use the `selects` query parameter (repeatable) to select fields to return.", + "description": "**Alpha:** The request and response contract may change;\nReturns one run by ID for the given session. Use the `selects` query parameter (repeatable) to select fields to return.", "tags": [ "runs" ], @@ -37327,10 +37451,9 @@ } }, { - "description": "`start_time` is the run's `start_time` (RFC3339 date-time), used together with `project_id` to locate the run.", + "description": "`start_time` is the run's `start_time` (RFC3339 date-time). Providing it speeds up retrieval.", "name": "start_time", "in": "query", - "required": true, "schema": { "format": "date-time", "type": "string", @@ -37409,6 +37532,16 @@ } } }, + "501": { + "description": "not implemented", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shared.ProblemDetails" + } + } + } + }, "503": { "description": "service unavailable", "content": { @@ -37548,6 +37681,119 @@ } } }, + "/v2/runs/{run_id}/url": { + "get": { + "security": [ + { + "API Key": [], + "Tenant ID": [] + }, + { + "Bearer Auth": [], + "Tenant ID": [] + } + ], + "description": "Returns the URL to view a specific run in the LangSmith UI. The caller must supply the\nrun's project_id and trace_id as query parameters; start_time is optional.", + "tags": [ + "runs" + ], + "summary": "Get the LangSmith UI URL for a run (v2)", + "parameters": [ + { + "description": "Run UUID", + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "Project (session) UUID", + "name": "project_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Project Id" + } + }, + { + "description": "Trace UUID", + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Trace Id" + } + }, + { + "description": "Run start time in RFC3339 format; omit if unknown", + "name": "start_time", + "in": "query", + "schema": { + "type": "string", + "title": "Start Time" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/query.RunURLResponse" + } + } + } + }, + "400": { + "description": "missing or invalid query parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shared.ProblemDetails" + } + } + } + }, + "401": { + "description": "missing or invalid authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shared.ProblemDetails" + } + } + } + }, + "403": { + "description": "forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shared.ProblemDetails" + } + } + } + }, + "404": { + "description": "project not found or does not belong to this workspace", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shared.ProblemDetails" + } + } + } + } + }, + "x-public": true + } + }, "/v2/runs/{trace_id}/share": { "delete": { "security": [ @@ -40443,8 +40689,8 @@ "schema": { "default": 20, "minimum": 1, - "maximum": 100, "type": "integer", + "maximum": 100, "title": "Page Size" } }, @@ -43351,6 +43597,7 @@ "add_annotation_queue_reviewer", "remove_annotation_queue_reviewer", "add_items_to_annotation_queue", + "get_annotation_queue_items", "submit_nps_response", "create_mcp_server", "update_mcp_server", @@ -43412,6 +43659,7 @@ "update_sandbox_registry", "delete_sandbox_registry", "create_data_plane", + "delete_data_plane", "create_annotation_queue", "populate_annotation_queue", "delete_annotation_queue", @@ -43555,6 +43803,7 @@ "stream_feedback_delta", "read_comparative_experiments", "stream_grouped_experiments", + "get_run_url", "query_run", "query_runs", "query_trace", @@ -74563,6 +74812,13 @@ "description": "CurrentSpendUSD is the spend in the policy's current window. Set for\nany spend_cap policy regardless of enabled state — disabled policies\nstill surface usage so users can see what would have been counted.\nNil for non-spend_cap policies or when the spend lookup failed.", "type": "number" }, + "current_usage": { + "description": "CurrentUsage is the consumed units in each configured limit's current\nwindow. Set for any rate_limit policy regardless of enabled state, one\nentry per limit in the config. Nil for non-rate_limit policies or when\nthe usage lookup failed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/gateway_policies.RateLimitUsage" + } + }, "description": { "type": "string" }, @@ -74602,6 +74858,53 @@ } } }, + "gateway_policies.RateLimitMetric": { + "type": "string", + "enum": [ + "requests", + "tokens" + ], + "x-enum-varnames": [ + "RateLimitMetricRequests", + "RateLimitMetricTokens" + ] + }, + "gateway_policies.RateLimitUsage": { + "type": "object", + "properties": { + "metric": { + "description": "Metric is the counted usage dimension: requests or tokens.", + "allOf": [ + { + "$ref": "#/components/schemas/gateway_policies.RateLimitMetric" + } + ] + }, + "value": { + "description": "Value is the units consumed so far in the current window.", + "type": "integer" + }, + "window": { + "description": "Window is the time window the usage is measured over.", + "allOf": [ + { + "$ref": "#/components/schemas/gateway_policies.RateLimitWindow" + } + ] + } + } + }, + "gateway_policies.RateLimitWindow": { + "type": "string", + "enum": [ + "minute", + "hour" + ], + "x-enum-varnames": [ + "RateLimitWindowMinute", + "RateLimitWindowHour" + ] + }, "gateway_policies.SearchGatewayPoliciesRequest": { "type": "object", "properties": { @@ -76484,6 +76787,14 @@ "RunTypeParser" ] }, + "query.RunURLResponse": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, "query.Trace": { "type": "object", "properties": {