Skip to content

Update version to 0.8.15 and enhance error handling in agent execution and message management#129

Merged
kryvokhyzha merged 1 commit intomainfrom
dev
Apr 20, 2026
Merged

Update version to 0.8.15 and enhance error handling in agent execution and message management#129
kryvokhyzha merged 1 commit intomainfrom
dev

Conversation

@kryvokhyzha
Copy link
Copy Markdown
Owner

This pull request focuses on improving the reliability and robustness of the add_messages and clear_history endpoints, as well as fixing issues related to handling message lists (especially [-1] indexing). These changes ensure better error handling and data consistency across the agent toolkit service.

Endpoints and API robustness:

  • Improved error handling in the add_messages and clear_history endpoints to gracefully handle missing or empty message histories, returning appropriate HTTP errors when necessary.
  • Enhanced the add_messages endpoint to include all relevant message fields (type, content, tool_call_id, tool_calls), and to exclude fields with None values for cleaner data storage.
  • Updated the history endpoint to safely retrieve messages using .get("messages", []), preventing errors when the key is missing.

Agent response handling:

  • Added validation to ensure agent responses contain events and messages before accessing the last message, raising clear errors if not. This prevents IndexError when handling [-1] on empty lists.

Versioning and documentation:

  • Bumped the project version to 0.8.15 and updated the CHANGELOG.md to reflect these fixes. [1] [2]

@kryvokhyzha kryvokhyzha self-assigned this Apr 20, 2026
@kryvokhyzha kryvokhyzha added the bug Something isn't working label Apr 20, 2026
@kryvokhyzha kryvokhyzha merged commit dbaf0e6 into main Apr 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant