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
/home/xingyaow/Projects/agent-sdk/.venv/lib/python3.12/site-packages/pydantic/main.py:464: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Expected 10 fields but got 7: Expected `Message` - serialized value may not be as expected [field_name='message', input_value=Message(content="I'd be h...do this step by step."}), input_type=Message])
PydanticSerializationUnexpectedValue(Expected `StreamingChoices` - serialized value may not be as expected [field_name='choices', input_value=Choices(finish_reason='to...ider_specific_fields={}), input_type=Choices])
return self.__pydantic_serializer__.to_python(
shows up when we do uv run examples/01_standalone_sdk/01_hello_world.py
The PR is marked as draft and ready for review. All changes have been committed with proper co-authorship attribution and pushed to the openhands-workspace-73gj32i8 branch.
Activity
[-]: UserWarning: Pydantic serializer warnings[/-][+]UserWarning: Pydantic serializer warnings[/+]openhands-ai commentedon Oct 27, 2025
I'm on it! xingyaoww can track my progress at all-hands.dev
Fix #916: Suppress Pydantic serializer warnings from litellm
openhands-ai commentedon Oct 27, 2025
Summary
I've successfully fixed issue #916 - Suppressed Pydantic serializer warnings from litellm.
✅ Changes Made:
Modified
openhands-sdk/openhands/sdk/llm/__init__.py:warnings.filterwarnings("ignore", message="Pydantic serializer warnings")at module level to globally suppress these warnings# noqa: E402comments to all imports to satisfy linting requirements (imports must come after the warning filter)Created
tests/sdk/llm/test_pydantic_warning_suppression.py:✅ Verification:
uv run examples/01_standalone_sdk/01_hello_world.pyshowed UserWarning about "Pydantic serializer warnings"📦 Pull Request:
Created draft PR #917: #917
The PR is marked as draft and ready for review. All changes have been committed with proper co-authorship attribution and pushed to the
openhands-workspace-73gj32i8branch.View full conversation
Fix #916: Suppress Pydantic serializer warnings from litellm
Fix #916: Suppress Pydantic serializer warnings from litellm
Fix #916: Suppress Pydantic serializer warnings from litellm
Fix #916: Suppress Pydantic serializer warnings from litellm
Fix #916: Suppress Pydantic serializer warnings from litellm
Fix #916: Suppress Pydantic serializer warnings from litellm (#917)
Fix OpenHands#916: Suppress Pydantic serializer warnings from litellm (…
Fix OpenHands#916: Suppress Pydantic serializer warnings from litellm (…