From 76203e2c204b53f0693d4b0466b1240c33dacbce Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:52:06 -0800 Subject: [PATCH] chore: Sync langgraph.json schema (#6530) --- libs/cli/generate_schema.py | 2 ++ libs/cli/langgraph_cli/schemas.py | 55 ++++++++++++++++++++++++++++++- libs/cli/schemas/schema.json | 45 ++++++++++++++++++++++++- libs/cli/schemas/schema.v0.json | 45 ++++++++++++++++++++++++- 4 files changed, 144 insertions(+), 3 deletions(-) diff --git a/libs/cli/generate_schema.py b/libs/cli/generate_schema.py index 32f55d60b..99e521d28 100644 --- a/libs/cli/generate_schema.py +++ b/libs/cli/generate_schema.py @@ -15,6 +15,7 @@ import msgspec from langgraph_cli.schemas import ( AuthConfig, + CacheConfig, CheckpointerConfig, Config, ConfigurableHeaderConfig, @@ -111,6 +112,7 @@ def add_descriptions_to_schema(schema, cls): SecurityConfig, HttpConfig, CorsConfig, + CacheConfig, ThreadTTLConfig, CheckpointerConfig, SerdeConfig, diff --git a/libs/cli/langgraph_cli/schemas.py b/libs/cli/langgraph_cli/schemas.py index 076400717..7e66ea467 100644 --- a/libs/cli/langgraph_cli/schemas.py +++ b/libs/cli/langgraph_cli/schemas.py @@ -233,6 +233,27 @@ class SecurityConfig(TypedDict, total=False): """ +class CacheConfig(TypedDict, total=False): + cache_keys: list[str] + """Optional. List of header keys to use for caching. + + Example: + ["user_id", "workspace_id"] + """ + ttl_seconds: int + """Optional. Time-to-live in seconds for cached items. + + Example: + 3600 + """ + max_size: int + """Optional. Maximum size of the cache. + + Example: + 100 + """ + + class AuthConfig(TypedDict, total=False): """Configuration for custom authentication logic and how it integrates into the OpenAPI spec.""" @@ -269,6 +290,16 @@ class AuthConfig(TypedDict, total=False): ] } """ + cache: CacheConfig + """Optional. Cache configuration for the server. + + Example: + { + "cache_keys": ["user_id", "workspace_id"], + "ttl_seconds": 3600, + "max_size": 100 + } + """ class CorsConfig(TypedDict, total=False): @@ -367,7 +398,12 @@ class HttpConfig(TypedDict, total=False): Default is False. """ disable_mcp: bool - """Optional. If `True`, /mcp routes are removed, disabling the MCP server. + """Optional. If `True`, /mcp routes are removed, disabling default support to expose the deployment as an MCP server. + + Default is False. + """ + disable_a2a: bool + """Optional. If `True`, /a2a routes are removed, disabling default support to expose the deployment as an agent-to-agent (A2A) server. Default is False. """ @@ -377,6 +413,17 @@ class HttpConfig(TypedDict, total=False): Set to True to disable the following endpoints: /openapi.json, /info, /metrics, /docs. This will also make the /ok endpoint skip any DB or other checks, always returning {"ok": True}. + Default is False. + """ + disable_ui: bool + """Optional. If `True`, /ui routes are removed, disabling the UI server. + + Default is False. + """ + disable_webhooks: bool + """Optional. If `True`, webhooks are disabled. Runs created with an associated webhook will + still be executed, but the webhook event will not be sent. + Default is False. """ cors: CorsConfig | None @@ -409,6 +456,12 @@ class HttpConfig(TypedDict, total=False): Default is False. This flag only affects authentication behavior if `app` is provided and contains custom routes. """ + mount_prefix: str + """Optional. URL prefix to prepend to all the routes. + + Example: + "/api" + """ class Config(TypedDict, total=False): diff --git a/libs/cli/schemas/schema.json b/libs/cli/schemas/schema.json index 0a36966d1..5432ead0b 100644 --- a/libs/cli/schemas/schema.json +++ b/libs/cli/schemas/schema.json @@ -405,6 +405,10 @@ "description": "Configuration for custom authentication logic and how it integrates into the OpenAPI spec.", "type": "object", "properties": { + "cache": { + "$ref": "#/$defs/CacheConfig", + "description": "Optional. Cache configuration for the server.\n" + }, "disable_studio_auth": { "type": "boolean", "description": "Optional. Whether to disable LangSmith API-key authentication for requests originating the Studio.\n\nDefaults to False, meaning that if a particular header is set, the server will verify the `x-api-key` header\nvalue is a valid API key for the deployment's workspace. If `True`, all requests will go through your custom\nauthentication logic, regardless of origin of the request.\n" @@ -420,6 +424,29 @@ }, "required": [] }, + "CacheConfig": { + "title": "CacheConfig", + "type": "object", + "properties": { + "cache_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional. List of header keys to use for caching.\n" + }, + "max_size": { + "type": "integer", + "description": "Optional. Maximum size of the cache.\n" + }, + "ttl_seconds": { + "type": "integer", + "description": "Optional. Time-to-live in seconds for cached items.\n" + } + }, + "required": [], + "description": "dict() -> new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n d = {}\n for k, v in iterable:\n d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n in the keyword argument list. For example: dict(one=1, two=2)" + }, "SecurityConfig": { "title": "SecurityConfig", "description": "Configuration for OpenAPI security definitions and requirements.\n\nUseful for specifying global or path-level authentication and authorization flows\n(e.g., OAuth2, API key headers, etc.).", @@ -596,13 +623,17 @@ ], "description": "Optional. Defines CORS restrictions. If omitted, no special rules are set and\ncross-origin behavior depends on default server settings.\n" }, + "disable_a2a": { + "type": "boolean", + "description": "Optional. If `True`, /a2a routes are removed, disabling default support to expose the deployment as an agent-to-agent (A2A) server.\n\nDefault is False.\n" + }, "disable_assistants": { "type": "boolean", "description": "Optional. If `True`, /assistants routes are removed from the server.\n\nDefault is False (meaning /assistants is enabled).\n" }, "disable_mcp": { "type": "boolean", - "description": "Optional. If `True`, /mcp routes are removed, disabling the MCP server.\n\nDefault is False.\n" + "description": "Optional. If `True`, /mcp routes are removed, disabling default support to expose the deployment as an MCP server.\n\nDefault is False.\n" }, "disable_meta": { "type": "boolean", @@ -620,6 +651,14 @@ "type": "boolean", "description": "Optional. If `True`, /threads routes are removed.\n\nDefault is False.\n" }, + "disable_ui": { + "type": "boolean", + "description": "Optional. If `True`, /ui routes are removed, disabling the UI server.\n\nDefault is False.\n" + }, + "disable_webhooks": { + "type": "boolean", + "description": "Optional. If `True`, webhooks are disabled. Runs created with an associated webhook will\nstill be executed, but the webhook event will not be sent.\n\nDefault is False.\n" + }, "enable_custom_route_auth": { "type": "boolean", "description": "Optional. If `True`, authentication is enabled for custom routes,\nnot just the routes that are protected by default.\n(Routes protected by default include /assistants, /threads, and /runs).\n\nDefault is False. This flag only affects authentication behavior\nif `app` is provided and contains custom routes.\n" @@ -648,6 +687,10 @@ } ], "description": "Optional. Defines the order in which to apply server customizations.\n" + }, + "mount_prefix": { + "type": "string", + "description": "Optional. URL prefix to prepend to all the routes.\n" } }, "required": [] diff --git a/libs/cli/schemas/schema.v0.json b/libs/cli/schemas/schema.v0.json index 0a36966d1..5432ead0b 100644 --- a/libs/cli/schemas/schema.v0.json +++ b/libs/cli/schemas/schema.v0.json @@ -405,6 +405,10 @@ "description": "Configuration for custom authentication logic and how it integrates into the OpenAPI spec.", "type": "object", "properties": { + "cache": { + "$ref": "#/$defs/CacheConfig", + "description": "Optional. Cache configuration for the server.\n" + }, "disable_studio_auth": { "type": "boolean", "description": "Optional. Whether to disable LangSmith API-key authentication for requests originating the Studio.\n\nDefaults to False, meaning that if a particular header is set, the server will verify the `x-api-key` header\nvalue is a valid API key for the deployment's workspace. If `True`, all requests will go through your custom\nauthentication logic, regardless of origin of the request.\n" @@ -420,6 +424,29 @@ }, "required": [] }, + "CacheConfig": { + "title": "CacheConfig", + "type": "object", + "properties": { + "cache_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional. List of header keys to use for caching.\n" + }, + "max_size": { + "type": "integer", + "description": "Optional. Maximum size of the cache.\n" + }, + "ttl_seconds": { + "type": "integer", + "description": "Optional. Time-to-live in seconds for cached items.\n" + } + }, + "required": [], + "description": "dict() -> new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n d = {}\n for k, v in iterable:\n d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n in the keyword argument list. For example: dict(one=1, two=2)" + }, "SecurityConfig": { "title": "SecurityConfig", "description": "Configuration for OpenAPI security definitions and requirements.\n\nUseful for specifying global or path-level authentication and authorization flows\n(e.g., OAuth2, API key headers, etc.).", @@ -596,13 +623,17 @@ ], "description": "Optional. Defines CORS restrictions. If omitted, no special rules are set and\ncross-origin behavior depends on default server settings.\n" }, + "disable_a2a": { + "type": "boolean", + "description": "Optional. If `True`, /a2a routes are removed, disabling default support to expose the deployment as an agent-to-agent (A2A) server.\n\nDefault is False.\n" + }, "disable_assistants": { "type": "boolean", "description": "Optional. If `True`, /assistants routes are removed from the server.\n\nDefault is False (meaning /assistants is enabled).\n" }, "disable_mcp": { "type": "boolean", - "description": "Optional. If `True`, /mcp routes are removed, disabling the MCP server.\n\nDefault is False.\n" + "description": "Optional. If `True`, /mcp routes are removed, disabling default support to expose the deployment as an MCP server.\n\nDefault is False.\n" }, "disable_meta": { "type": "boolean", @@ -620,6 +651,14 @@ "type": "boolean", "description": "Optional. If `True`, /threads routes are removed.\n\nDefault is False.\n" }, + "disable_ui": { + "type": "boolean", + "description": "Optional. If `True`, /ui routes are removed, disabling the UI server.\n\nDefault is False.\n" + }, + "disable_webhooks": { + "type": "boolean", + "description": "Optional. If `True`, webhooks are disabled. Runs created with an associated webhook will\nstill be executed, but the webhook event will not be sent.\n\nDefault is False.\n" + }, "enable_custom_route_auth": { "type": "boolean", "description": "Optional. If `True`, authentication is enabled for custom routes,\nnot just the routes that are protected by default.\n(Routes protected by default include /assistants, /threads, and /runs).\n\nDefault is False. This flag only affects authentication behavior\nif `app` is provided and contains custom routes.\n" @@ -648,6 +687,10 @@ } ], "description": "Optional. Defines the order in which to apply server customizations.\n" + }, + "mount_prefix": { + "type": "string", + "description": "Optional. URL prefix to prepend to all the routes.\n" } }, "required": []