Skip to content

Commit 78f6d34

Browse files
google-genai-botcopybara-github
authored andcommitted
feat(sdks): enable fixes.openSingleValueEnumsOct2026 across all SDKs
Enable `fixes.openSingleValueEnumsOct2026: true` in `.speakeasy/gen.yaml` across all SDKs (Python, TypeScript, Go, Java, .NET, and CLI) and regenerate so single-value response enums (`EnvironmentNetworkEnum`, `Language`, `NetworkEnum`, `Disabled`, and `ImageResponseFormatMimeType`) are marked open and tolerate unknown server-returned values without failing deserialization. Union discriminator tag enums remain closed. PiperOrigin-RevId: 999748792
1 parent eb0abe1 commit 78f6d34

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
3232

3333

34-
EnvironmentNetworkEnum = Literal["disabled",]
34+
EnvironmentNetworkEnum = Union[Literal["disabled",], UnrecognizedStr]
3535

3636

3737
EnvironmentNetworkUnionTypedDict = TypeAliasType(

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
1919

2020
from __future__ import annotations
21-
from .. import BaseModel, UNSET_SENTINEL
21+
from .. import BaseModel, UNSET_SENTINEL, UnrecognizedStr
2222
from pydantic import model_serializer
23-
from typing import Literal, Optional
23+
from typing import Literal, Optional, Union
2424
from typing_extensions import NotRequired, TypedDict
2525

2626

27-
Language = Literal["python",]
27+
Language = Union[Literal["python",], UnrecognizedStr]
2828
r"""Programming language of the `code`."""
2929

3030

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
1919

2020
from __future__ import annotations
21-
from .. import BaseModel, UNSET_SENTINEL
21+
from .. import BaseModel, UNSET_SENTINEL, UnrecognizedStr
2222
from ...utils import validate_const
2323
from .environmentnetworkegressallowlist import (
2424
EnvironmentNetworkEgressAllowlist,
@@ -39,7 +39,7 @@
3939
Env = TypeAliasType("Env", Union[EnvVar, str])
4040

4141

42-
NetworkEnum = Literal["disabled",]
42+
NetworkEnum = Union[Literal["disabled",], UnrecognizedStr]
4343

4444

4545
NetworkParam = TypeAliasType(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
1919

2020
from __future__ import annotations
21-
from .. import BaseModel, UNSET_SENTINEL
21+
from .. import BaseModel, UNSET_SENTINEL, UnrecognizedStr
2222
from .allowlistentry import AllowlistEntry, AllowlistEntryParam
2323
from pydantic import model_serializer
2424
from typing import List, Literal, Optional, Union
2525
from typing_extensions import NotRequired, TypeAliasType, TypedDict
2626

2727

28-
Disabled = Literal["disabled",]
28+
Disabled = Union[Literal["disabled",], UnrecognizedStr]
2929

3030

3131
AllowlistParam = TypeAliasType(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
r"""The size of the image output."""
7272

7373

74-
ImageResponseFormatMimeType = Literal["image/jpeg",]
74+
ImageResponseFormatMimeType = Union[Literal["image/jpeg",], UnrecognizedStr]
7575
r"""The MIME type of the image output."""
7676

7777

0 commit comments

Comments
 (0)