feat(cli): add flag in HttpConfig for auth on custom routes (#6193)

We currently only support auth on the default routes; we'd like to be
able to support it on all (non-meta/liveness probe) routes by default.
This is the first step in that direction.
This commit is contained in:
Parker J. Rule
2025-09-25 17:17:33 -04:00
committed by GitHub
parent ea0aebaa2e
commit b0a25f2794
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -371,6 +371,14 @@ class HttpConfig(TypedDict, total=False):
Default is `middleware_first`.
"""
enable_custom_route_auth: bool
"""Optional. If True, authentication is enabled for custom routes,
not just the routes that are protected by default.
(Routes protected by default include /assistants, /threads, and /runs).
Default is False. This flag only affects authentication behavior
if `app` is provided and contains custom routes.
"""
class Config(TypedDict, total=False):
+4
View File
@@ -577,6 +577,10 @@
"type": "boolean",
"description": "Optional. If True, /threads routes are removed.\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"
},
"logging_headers": {
"anyOf": [
{
+4
View File
@@ -577,6 +577,10 @@
"type": "boolean",
"description": "Optional. If True, /threads routes are removed.\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"
},
"logging_headers": {
"anyOf": [
{