Skip to content

Conversation

@ryoppippi
Copy link
Member

@ryoppippi ryoppippi commented Aug 27, 2025

Summary by cubic

Removed the acall method that wrapped the sync call in a thread, simplifying the API and avoiding misleading async behavior. Deleted the related async test.

  • Migration
    • Replace tool.acall(...) with await asyncio.to_thread(tool.call, ...) in async code.
    • Or use loop.run_in_executor(None, lambda: tool.call(...)) on older patterns.
    • If not using async, call tool.call(...) directly.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Contributor

@glebedel glebedel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI review requested due to automatic review settings September 14, 2025 18:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the misleading async acall method from the Tool class and its associated test. The acall method was using asyncio.run_in_executor to wrap the synchronous call method in a thread, which provided false async behavior rather than true async I/O.

  • Removes the acall method and its docstring from the Tool class
  • Deletes the async test case that tested the acall functionality
  • Removes unused imports (asyncio and functools.partial) that were only needed for the removed method

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
stackone_ai/models.py Removes the acall method and cleans up unused imports
tests/test_tool_calling.py Deletes the async test case for the removed acall method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@glebedel glebedel merged commit 370699e into main Sep 14, 2025
5 checks passed
@glebedel glebedel deleted the remove-async branch September 14, 2025 18:34
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.

3 participants