You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
422 Unprocessable Entity in versions 2.6.0, 2.7.0, 2.8.0 when trying to save an eval case #7019
Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A
Describe the Bug: #6336 seems to still persist in versions 2.6.0, 2.7.0, 2.8.0.
Upon trying to edit an eval case on an existing eval set, and hitting save (on the top right) this error is seen: HTTP/1.1" 422 Unprocessable Entity
Steps to Reproduce:
Similar to in #6336 but adding steps anyway:
adk web
Go to localhost:8000
Create a new session
Once agent responds, got to evals tab and create a new eval (+ new)
Open eval set, and hit +current session (adds the session to eval set)
Once added, session shows in the evalset, hit edit and try to edit some message in the session
Once edit done, hit save on the top right
Save does not happen. I see this on the logs: HTTP/1.1" 422 Unprocessable Entity
Expected Behavior:
The eval set should update the eval case and give 200 OK
I traced the current Web UI update path: the browser sends the edited conversation, sessionInput, and creationTimestamp to the eval-case PUT endpoint, while the backend validates the request as an EvalCase. The reported 422 appears to be in that request-model boundary, but I have not yet reproduced it against the affected releases. Would you be comfortable with me preparing a focused regression test and fix for this issue?
Taking the RubricContent half of this. Checked first: no PR references #7019 and it's unassigned (the earlier #6515 fix only patched InvocationEvent.content).
Root cause I found and reproduced: RubricContent.text_property is typed Optional[str] with no default, so Pydantic v2 still treats it as required. The Web UI GET serializes with response_model_exclude_none=True, dropping text_property: None, and the save PUT then fails validation with 422 — the same required-Optional trap #6515 fixed for InvocationEvent.content but missed here.
@shivammathur33 Found and fixed one real cause of this (RubricContent.text_property missing a default, same trap as #6515, PR up in #7026) but your steps don't mention adding any rubric and I couldn't get a plain session-edit save to 422 locally on main so not fully convinced #7026 covers your exact case yet. Could you check your browser's network tab on the failing save and paste the actual 422 response body or confirm whether the eval case had any rubrics attached? If you get a chance to test against #7026 once it's up let us know if it clears things on your end before we close this out.
@surajksharma07 Don't think I am adding any rubrics. I had to reproduce the responses with LiteLlm since I do not have personal gemini-2.5-pro access. But I do see the same 422 response.
Tried on main, #6919 and #7026 and encountered the same issue.
Request payload:
{
"evalId": "Weather_in_chicago",
"conversation": [
{
"invocationId": "e-716ee625-05b6-4a47-aeb2-d10a4a0bbdc0",
"userContent": {
"parts": [
{
"text": "Weather in chicago?"
}
],
"role": "user"
},
"finalResponse": {
"parts": [
{
"text": "The current weather in Chicago is clear with a temperature of 24.4 degrees Celsius and a wind speed of 13.8 km/h. The skies are currently clear, indicating good visibility and sunny conditions."
}
],
"role": "model"
},
"intermediateData": {
"invocationEvents": [
{
"author": "research_agent",
"content": {
"parts": [
{
"functionCall": {
"id": "call_xvno6vyr",
"args": {
"city": "chicago"
},
"name": "get_weather"
}
}
],
"role": "model"
},
"invocationIndex": 0,
"toolUseIndex": 0
},
{
"author": "research_agent",
"content": {
"parts": [
{
"functionResponse": {
"id": "call_xvno6vyr",
"name": "get_weather",
"response": {
"status": "ok",
"location": "Chicago, United States",
"temperature_c": 24.4,
"wind_speed_kmh": 13.8,
"conditions": "clear sky"
}
}
}
],
"role": "user"
},
"invocationIndex": 0
}
]
},
"creationTimestamp": 1788817941.870899
}
],
"sessionInput": {
"appName": "research_agent",
"userId": "user",
"state": {}
},
"creationTimestamp": 1788817991.232703
}
@shivammathur33 Thanks for pasting the payload, that pins down a different bug than #7026. Your 422 shows extra_forbidden on invocationIndex and toolUseIndex inside conversation[0].intermediateData.invocationEvents. InvocationEvent only defines author/content/groundingMetadata and forbids extras so it looks like the Web UI's event view-model (which tracks those two indices for the transcript/diff view) is getting serialized straight into the save request instead of just the raw event fields. That's why #7026 didn't help you, it only fixes the missing-field case for rubrics not this extra-field one. Treating this as its own root cause now, will follow up once there's a fix (likely stripping those UI-only fields client-side before the PUT or relaxing InvocationEvent to tolerate unknowns).
Activity
UniversePeak commentedon Sep 5, 2026
I traced the current Web UI update path: the browser sends the edited
conversation,sessionInput, andcreationTimestampto the eval-case PUT endpoint, while the backend validates the request as anEvalCase. The reported 422 appears to be in that request-model boundary, but I have not yet reproduced it against the affected releases. Would you be comfortable with me preparing a focused regression test and fix for this issue?shivammathur33 commentedon Sep 5, 2026
Yes.
ALDRIN121 commentedon Sep 5, 2026
Taking the RubricContent half of this. Checked first: no PR references #7019 and it's unassigned (the earlier #6515 fix only patched InvocationEvent.content).
Root cause I found and reproduced:
RubricContent.text_propertyis typedOptional[str]with no default, so Pydantic v2 still treats it as required. The Web UI GET serializes withresponse_model_exclude_none=True, droppingtext_property: None, and the save PUT then fails validation with 422 — the same required-Optional trap #6515 fixed forInvocationEvent.contentbut missed here.PR up shortly with a regression test.
surajksharma07 commentedon Sep 7, 2026
@shivammathur33 Found and fixed one real cause of this (RubricContent.text_property missing a default, same trap as #6515, PR up in #7026) but your steps don't mention adding any rubric and I couldn't get a plain session-edit save to 422 locally on main so not fully convinced #7026 covers your exact case yet. Could you check your browser's network tab on the failing save and paste the actual 422 response body or confirm whether the eval case had any rubrics attached? If you get a chance to test against #7026 once it's up let us know if it clears things on your end before we close this out.
shivammathur33 commentedon Sep 7, 2026
@surajksharma07 Don't think I am adding any rubrics. I had to reproduce the responses with LiteLlm since I do not have personal gemini-2.5-pro access. But I do see the same 422 response.
Tried on main, #6919 and #7026 and encountered the same issue.
Request payload:
Response payload:
surajksharma07 commentedon Sep 10, 2026
@shivammathur33 Thanks for pasting the payload, that pins down a different bug than #7026. Your 422 shows extra_forbidden on invocationIndex and toolUseIndex inside conversation[0].intermediateData.invocationEvents. InvocationEvent only defines author/content/groundingMetadata and forbids extras so it looks like the Web UI's event view-model (which tracks those two indices for the transcript/diff view) is getting serialized straight into the save request instead of just the raw event fields. That's why #7026 didn't help you, it only fixes the missing-field case for rubrics not this extra-field one. Treating this as its own root cause now, will follow up once there's a fix (likely stripping those UI-only fields client-side before the PUT or relaxing InvocationEvent to tolerate unknowns).
fix(eval): ignore UI-only InvocationEvent fields on eval case save
fix(eval): ignore UI-only InvocationEvent fields on eval case save
fix(eval): ignore UI-only InvocationEvent fields on eval case save
fix(eval): default RubricContent.text_property to None so rubrics sav…
fix(eval): default RubricContent.text_property to None so rubrics sav…
fix(eval): default RubricContent.text_property to None so rubrics sav…
fix(eval): default RubricContent.text_property to None so rubrics sav…