@@ -103,6 +103,7 @@ class Kernel(SyncAPIClient):
103103 browser_route_cache : BrowserRouteCache
104104
105105 project_id : str | None
106+ project : str | None
106107
107108 _environment : Literal ["production" , "development" ] | NotGiven
108109 _browser_routing : BrowserRoutingConfig
@@ -112,6 +113,7 @@ def __init__(
112113 * ,
113114 api_key : str | None = None ,
114115 project_id : str | None = None ,
116+ project : str | None = None ,
115117 environment : Literal ["production" , "development" ] | NotGiven = not_given ,
116118 base_url : str | httpx .URL | None | NotGiven = not_given ,
117119 timeout : float | Timeout | None | NotGiven = not_given ,
@@ -147,6 +149,8 @@ def __init__(
147149
148150 self .project_id = project_id
149151
152+ self .project = project
153+
150154 self ._environment = environment
151155
152156 base_url_env = os .environ .get ("KERNEL_BASE_URL" )
@@ -328,6 +332,7 @@ def default_headers(self) -> dict[str, str | Omit]:
328332 ** super ().default_headers ,
329333 "X-Stainless-Async" : "false" ,
330334 "X-Kernel-Project-Id" : self .project_id if self .project_id is not None else Omit (),
335+ "X-Kernel-Project" : self .project if self .project is not None else Omit (),
331336 ** self ._custom_headers ,
332337 }
333338
@@ -367,6 +372,7 @@ def copy(
367372 * ,
368373 api_key : str | None = None ,
369374 project_id : str | None = None ,
375+ project : str | None = None ,
370376 environment : Literal ["production" , "development" ] | None = None ,
371377 base_url : str | httpx .URL | None = None ,
372378 timeout : float | Timeout | None | NotGiven = not_given ,
@@ -404,6 +410,7 @@ def copy(
404410 return self .__class__ (
405411 api_key = api_key or self .api_key ,
406412 project_id = project_id or self .project_id ,
413+ project = project or self .project ,
407414 base_url = base_url or self .base_url ,
408415 environment = environment or self ._environment ,
409416 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
@@ -459,6 +466,7 @@ class AsyncKernel(AsyncAPIClient):
459466 browser_route_cache : BrowserRouteCache
460467
461468 project_id : str | None
469+ project : str | None
462470
463471 _environment : Literal ["production" , "development" ] | NotGiven
464472 _browser_routing : BrowserRoutingConfig
@@ -468,6 +476,7 @@ def __init__(
468476 * ,
469477 api_key : str | None = None ,
470478 project_id : str | None = None ,
479+ project : str | None = None ,
471480 environment : Literal ["production" , "development" ] | NotGiven = not_given ,
472481 base_url : str | httpx .URL | None | NotGiven = not_given ,
473482 timeout : float | Timeout | None | NotGiven = not_given ,
@@ -503,6 +512,8 @@ def __init__(
503512
504513 self .project_id = project_id
505514
515+ self .project = project
516+
506517 self ._environment = environment
507518
508519 base_url_env = os .environ .get ("KERNEL_BASE_URL" )
@@ -684,6 +695,7 @@ def default_headers(self) -> dict[str, str | Omit]:
684695 ** super ().default_headers ,
685696 "X-Stainless-Async" : f"async:{ get_async_library ()} " ,
686697 "X-Kernel-Project-Id" : self .project_id if self .project_id is not None else Omit (),
698+ "X-Kernel-Project" : self .project if self .project is not None else Omit (),
687699 ** self ._custom_headers ,
688700 }
689701
@@ -723,6 +735,7 @@ def copy(
723735 * ,
724736 api_key : str | None = None ,
725737 project_id : str | None = None ,
738+ project : str | None = None ,
726739 environment : Literal ["production" , "development" ] | None = None ,
727740 base_url : str | httpx .URL | None = None ,
728741 timeout : float | Timeout | None | NotGiven = not_given ,
@@ -760,6 +773,7 @@ def copy(
760773 return self .__class__ (
761774 api_key = api_key or self .api_key ,
762775 project_id = project_id or self .project_id ,
776+ project = project or self .project ,
763777 base_url = base_url or self .base_url ,
764778 environment = environment or self ._environment ,
765779 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
0 commit comments