Skip to content

Commit 3108d8c

Browse files
wanlin31copybara-github
authored andcommitted
fix: Update EnvironmentConfig.env schema to map keys to EnvVar or string.
PiperOrigin-RevId: 998182123
1 parent 4cbd751 commit 3108d8c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎google/genai/_gaos/types/interactions/environment.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@
3333
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
3434

3535

36-
EnvParam = TypeAliasType("EnvParam", Union[Dict[str, EnvVarParam], str])
37-
r"""Environment variables to set in the sandbox environment."""
36+
EnvParam = TypeAliasType("EnvParam", Union[EnvVarParam, str])
3837

3938

40-
Env = TypeAliasType("Env", Union[Dict[str, EnvVar], str])
41-
r"""Environment variables to set in the sandbox environment."""
39+
Env = TypeAliasType("Env", Union[EnvVar, str])
4240

4341

4442
NetworkEnum = Literal["disabled",]
@@ -59,7 +57,7 @@
5957
class EnvironmentParam(TypedDict):
6058
r"""Configuration for a custom environment."""
6159

62-
env: NotRequired[EnvParam]
60+
env: NotRequired[Dict[str, EnvParam]]
6361
r"""Environment variables to set in the sandbox environment."""
6462
environment_id: NotRequired[str]
6563
r"""Optional. The environment ID for the interaction. If specified, the request will
@@ -74,7 +72,7 @@ class EnvironmentParam(TypedDict):
7472
class Environment(BaseModel):
7573
r"""Configuration for a custom environment."""
7674

77-
env: Optional[Env] = None
75+
env: Optional[Dict[str, Env]] = None
7876
r"""Environment variables to set in the sandbox environment."""
7977

8078
environment_id: Optional[str] = None

0 commit comments

Comments
 (0)