mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
Preserve ImageUserInput in the Python SDK (#45796)
Keep the existing public class name for URL-based image input when regenerating the SDK. Map `UrlUserInput` to `ImageUserInput` during artifact generation and update the generated model and `UserInput` union accordingly. Extend the class-name stability test to assert that `ImageUserInput` remains importable under its expected name. GitOrigin-RevId: 6cbbd555e2e07904cc5fbc279e1e61ff089ac0a9
This commit is contained in:
committed by
copyberry
parent
7b8b17b97a
commit
63c09ed212
@@ -6240,7 +6240,7 @@ class TextUserInput(BaseModel):
|
||||
type: Annotated[Literal["text"], Field(title="TextUserInputType")]
|
||||
|
||||
|
||||
class UrlUserInput(BaseModel):
|
||||
class ImageUserInput(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
@@ -6304,7 +6304,7 @@ class MentionUserInput(BaseModel):
|
||||
class UserInput(
|
||||
RootModel[
|
||||
TextUserInput
|
||||
| UrlUserInput
|
||||
| ImageUserInput
|
||||
| FileIdUserInput
|
||||
| LocalImageUserInput
|
||||
| AudioUserInput
|
||||
@@ -6318,7 +6318,7 @@ class UserInput(
|
||||
)
|
||||
root: (
|
||||
TextUserInput
|
||||
| UrlUserInput
|
||||
| ImageUserInput
|
||||
| FileIdUserInput
|
||||
| LocalImageUserInput
|
||||
| AudioUserInput
|
||||
|
||||
Reference in New Issue
Block a user