Skip to content

Commit d7d7317

Browse files
boyangsvlcopybara-github
authored andcommitted
chore: Update deprecation messages for agent config classes
The deprecation messages for various agent config classes have been updated to clarify that config is now loaded via reflection, making these separate config classes obsolete. Co-authored-by: Bo Yang <ybo@google.com> PiperOrigin-RevId: 940084420
1 parent 8a7656b commit d7d7317

6 files changed

Lines changed: 20 additions & 7 deletions

File tree

src/google/adk/agents/agent_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ def agent_config_discriminator(v: Any) -> str:
6969

7070
# Use a RootModel to represent the agent directly at the top level.
7171
# The `discriminator` is applied to the union within the RootModel.
72-
@deprecated("AgentConfig is deprecated and will be removed in future versions.")
72+
@deprecated(
73+
"AgentConfig is deprecated and will be removed in future versions. "
74+
"Config is now loaded via reflection so the separate config class is no "
75+
"longer needed."
76+
)
7377
@experimental(FeatureName.AGENT_CONFIG)
7478
class AgentConfig(RootModel[ConfigsUnion]):
7579
"""The config for the YAML schema to create an agent."""

src/google/adk/agents/base_agent_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434

3535

3636
@deprecated(
37-
'BaseAgentConfig is deprecated and will be removed in future versions.'
37+
'BaseAgentConfig is deprecated and will be removed in future versions. '
38+
'Config is now loaded via reflection so the separate config class is no '
39+
'longer needed.'
3840
)
3941
@experimental(FeatureName.AGENT_CONFIG)
4042
class BaseAgentConfig(BaseModel):

src/google/adk/agents/llm_agent_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030

3131

3232
@deprecated(
33-
'LlmAgentConfig is deprecated and will be removed in future versions.'
33+
'LlmAgentConfig is deprecated and will be removed in future versions. '
34+
'Config is now loaded via reflection so the separate config class is no '
35+
'longer needed.'
3436
)
3537
class LlmAgentConfig(BaseAgentConfig):
3638
"""The config for the YAML schema of a LlmAgent."""

src/google/adk/agents/loop_agent_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929

3030
@deprecated(
31-
'LoopAgentConfig is deprecated and will be removed in future versions.'
31+
'LoopAgentConfig is deprecated and will be removed in future versions. '
32+
'Config is now loaded via reflection so the separate config class is no '
33+
'longer needed.'
3234
)
3335
@experimental(FeatureName.AGENT_CONFIG)
3436
class LoopAgentConfig(BaseAgentConfig):

src/google/adk/agents/parallel_agent_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727

2828
@deprecated(
29-
"ParallelAgentConfig is deprecated and will be removed in future versions."
29+
"ParallelAgentConfig is deprecated and will be removed in future versions. "
30+
"Config is now loaded via reflection so the separate config class is no "
31+
"longer needed."
3032
)
3133
@experimental(FeatureName.AGENT_CONFIG)
3234
class ParallelAgentConfig(BaseAgentConfig):

src/google/adk/agents/sequential_agent_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626

2727

2828
@deprecated(
29-
"SequentialAgentConfig is deprecated and will be removed in future"
30-
" versions."
29+
"SequentialAgentConfig is deprecated and will be removed in future "
30+
"versions. Config is now loaded via reflection so the separate config "
31+
"class is no longer needed."
3132
)
3233
@experimental(FeatureName.AGENT_CONFIG)
3334
class SequentialAgentConfig(BaseAgentConfig):

0 commit comments

Comments
 (0)