Deploying App (with Caching) to Agent Engine - Pydantic runtime error #3842
steffanianigro
started this conversation in
General
Replies: 3 comments
-
|
What is the version Vertex AI SDK are you using and how are you importing it ?, there has been some changes in the new versions, with regards to agent engine namespaces etc |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @vinodseshadri, I am trying to keep everything up to date and am using google-cloud-aiplatform=1.129.0. I am deploying using the python SDK so I am just importing the agent engine utilities. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@yeesian is this something you can help with. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have recently added caching to my agents by wrapping them as an App and it works well when evaluating the agent and using the in memory runner. I can also successfully deploy the agent to Agent Engine (updating my existing agent). However, when I invoke the agent, I get the error:
Input should be a valid dictionary or instance of BaseAgent [type=model_type, input_value=App(name='oracle', root_a...esumability_config=None), input_type=App].I suspect I am configuring the agent incorrectly when deploying but I can't find any alternatives to my current approach. An example of my agent and deployment configuration is below:
app = App( name="agent_name", root_agent=root_agent, context_cache_config=ContextCacheConfig( min_tokens=4096, ttl_seconds=600, cache_intervals=10, ), )agent_engines.update( resource_name=existing_agent.resource_name, agent_engine=AdkApp(agent=app), display_name="Agent", ... )To Reproduce
Expected behavior
I expect the agent to behave as normal. However, I get a runtime error due to a Pydantic model validation issue.
Screenshots
I have attached a screenshot of the logs.
Desktop (please complete the following information):
Model Information:
Additional context
I have tried on both ADK 1.19.0 and 1.20.0.
Beta Was this translation helpful? Give feedback.
All reactions