Skip to content

fix: accept status='completed' in ToolCallStatus (#128) - #149

Open
1HazyOne707 wants to merge 2 commits into
neo4j-labs:mainfrom
1HazyOne707:fix/toolcall-completed-status-128
Open

fix: accept status='completed' in ToolCallStatus (#128)#149
1HazyOne707 wants to merge 2 commits into
neo4j-labs:mainfrom
1HazyOne707:fix/toolcall-completed-status-128

Conversation

@1HazyOne707

Copy link
Copy Markdown

Summary

Fixes #128 — the hosted NAMS service returns status='completed' on successful tool calls, but ToolCallStatus only defined PENDING/SUCCESS/FAILURE/ERROR/TIMEOUT/CANCELLED, so record_tool_call() and get_session_traces() crash with a ValidationError on any real successful tool call.

Changes

  • Added COMPLETED = "completed" to ToolCallStatus — additive and non-breaking, unblocks the SDK regardless of whether the server side is also addressed (tracked separately at neo4j-labs/project-nams#74)
  • Added test_tool_call_accepts_completed_status to tests/unit/test_models.py

Closes #128

The hosted NAMS service returns status='completed' on successful tool
calls, but ToolCallStatus only had PENDING/SUCCESS/FAILURE/ERROR/
TIMEOUT/CANCELLED, so record_tool_call() and get_session_traces()
crashed with a ValidationError on any successful real-world call.

Adds COMPLETED = "completed" to the enum (additive, non-breaking).
Server-side this is being tracked separately at
neo4j-labs/project-nams#74; this unblocks the SDK regardless.

Closes neo4j-labs#128
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

@1HazyOne707 is attempting to deploy a commit to the lyonwj's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

[Python SDK] record_tool_call() and get_session_traces() crash with ValidationError — server returns status='completed' not in ToolCallStatus enum

1 participant