diff --git a/api/pyproject.toml b/api/pyproject.toml index 1dd926f24e..8dbedc7ea9 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "api" -version = "0.56.0" +version = "0.56.1" description = "Agenta API" authors = [ { name = "Mahmoud Mabrouk", email = "mahmoud@agenta.ai" }, diff --git a/sdk/agenta/sdk/types.py b/sdk/agenta/sdk/types.py index 25b79501c8..4440481bf5 100644 --- a/sdk/agenta/sdk/types.py +++ b/sdk/agenta/sdk/types.py @@ -21,13 +21,19 @@ def MCField( # pylint: disable=invalid-name default: str, choices: Union[List[str], Dict[str, List[str]]], ) -> Field: - field = Field(default=default, description="ID of the model to use") + # Pydantic 2.12+ no longer allows post-creation mutation of field properties if isinstance(choices, dict): - field.json_schema_extra = {"choices": choices, "x-parameter": "grouped_choice"} + json_extra = {"choices": choices, "x-parameter": "grouped_choice"} elif isinstance(choices, list): - field.json_schema_extra = {"choices": choices, "x-parameter": "choice"} - - return field + json_extra = {"choices": choices, "x-parameter": "choice"} + else: + json_extra = {} + + return Field( + default=default, + description="ID of the model to use", + json_schema_extra=json_extra, + ) class LLMTokenUsage(BaseModel): diff --git a/sdk/pyproject.toml b/sdk/pyproject.toml index c57d2b8b23..194fec6416 100644 --- a/sdk/pyproject.toml +++ b/sdk/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "agenta" -version = "0.56.0" +version = "0.56.1" description = "The SDK for agenta is an open-source LLMOps platform." readme = "README.md" authors = [ diff --git a/web/oss/package.json b/web/oss/package.json index 68c098b5c8..698a1aeea0 100644 --- a/web/oss/package.json +++ b/web/oss/package.json @@ -1,6 +1,6 @@ { "name": "@agenta/oss", - "version": "0.56.0", + "version": "0.56.1", "private": true, "engines": { "node": ">=18" diff --git a/web/package.json b/web/package.json index 4cec32420b..b79dcff972 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "agenta-web", - "version": "0.56.0", + "version": "0.56.1", "workspaces": [ "ee", "oss",