Skip to content

fix(history): copy local schema messages without serialization - #288

Open
YaoxinHuang wants to merge 3 commits into
Eigenwise:mainfrom
YaoxinHuang:fix/history-copy-local-schemas
Open

YaoxinHuang wants to merge 3 commits into
Eigenwise:mainfrom
YaoxinHuang:fix/history-copy-local-schemas

Conversation

@YaoxinHuang

Copy link
Copy Markdown

ChatHistory.copy() currently serializes and reimports message classes, so a history containing a schema defined inside a function raises ValueError and prevents AtomicAgent from initializing with that history. Deep-copy the messages directly, preserving the existing history type, limits, and turn ID; add regressions for nested copy independence and agent initialization/reset with a local schema.

Validation: 341 tests passed, 3 MiniMax API tests skipped; repository-wide Black and Flake8 checks and all applicable changed-file pre-commit hooks passed. Both new regressions fail before the fix. Developed and tested with Codex assistance.

Replace loading of chat history with deepcopy of existing history.
Add a test to verify that copying history with a local schema is independent from the original history.
Add test for resetting history with local schema in AtomicAgent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant