Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Conversation

@mcherukara
Copy link
Member

No description provided.

- Add complete tool calling module with universal middleware pattern
- Support for OpenAI, Anthropic, and Google function calling APIs
- Implement native and prompt-based tool calling with automatic fallback
- Add Pydantic models for type-safe API format conversion
- Integrate tool calling into Flask server routes
- Add comprehensive test suite with multiple scenarios
- Include documentation and examples
- Rename types/ to tool_types/ to avoid import conflicts

Key components:
- tool_calls/handler.py: Main tool calling logic
- tool_calls/input_handle.py: Request processing
- tool_calls/output_handle.py: Response formatting
- tool_calls/utils.py: Helper functions and model detection
- tool_calls/tool_prompts.py: Prompt templates
- tool_types/function_call.py: Pydantic type definitions
- examples/tool_calling_example.py: Comprehensive test suite
- TOOL_CALLING.md: Implementation documentation
- Add centralized logging configuration (logging_config.py)
- Replace print statements with proper logging in tool_calls modules
- Update argo_bridge.py to use structured summary logging
- Add environment variable control for verbose mode (ARGO_VERBOSE)
- Create comprehensive logging documentation (LOGGING.md)
- Default behavior: console shows WARNING+ only, file shows INFO+
- Verbose mode available via ARGO_VERBOSE=true for debugging
@mcherukara mcherukara requested review from Linked-Liszt and Copilot and removed request for Copilot August 9, 2025 03:17
@mcherukara mcherukara assigned mcherukara and unassigned mcherukara Aug 9, 2025
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 implements a comprehensive tool calling feature for the Argo Bridge project, adding support for OpenAI-compatible function calling across multiple LLM providers with both native and prompt-based fallback approaches.

Key changes include:

  • Complete tool calling infrastructure with universal middleware classes for format conversion
  • Input/output processing modules for request transformation and response extraction
  • Centralized logging system with configurable verbosity levels

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tool_types/function_call.py Pydantic type definitions for OpenAI, Anthropic, and Google function calling APIs
tool_types/init.py Type exports for function calling models
tool_calls/utils.py Utility functions for model detection, ID generation, and validation
tool_calls/tool_prompts.py Model-specific prompt templates for fallback scenarios
tool_calls/output_handle.py Response processing and tool call extraction logic
tool_calls/input_handle.py Request processing and tool format conversion
tool_calls/handler.py Universal middleware classes for tool call conversion between API formats
tool_calls/init.py Module exports for tool calling functionality
memory-bank/techContext.md Technical documentation for technology stack and architecture
memory-bank/systemPatterns.md System architecture patterns and design decisions
memory-bank/projectbrief.md Project overview and purpose documentation
memory-bank/progress.md Implementation progress tracking
memory-bank/productContext.md Product context and problem statement
memory-bank/activeContext.md Current project state and development priorities
logging_config.py Centralized logging configuration with environment variable support
examples/tool_calling_example.py Comprehensive test suite demonstrating tool calling functionality
argo_bridge.py Main Flask application integrated with tool calling functionality
TOOL_CALLING.md Detailed implementation documentation
LOGGING.md Logging configuration documentation

'fc_68600a8868248199a436492a47a75e440766032408f75a09'

>>> generate_id(mode='anthropic')
'toolu_vrtx_01LiZkD1myhnDz7gcoEe4Y5A'
Copy link

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

The docstring example shows 'toolu_vrtx_01LiZkD1myhnDz7gcoEe4Y5A' but the implementation generates 'toolu_{24-char base62}' without the 'vrtx_01' prefix. Update the example to match the actual implementation.

Suggested change
'toolu_vrtx_01LiZkD1myhnDz7gcoEe4Y5A'
'toolu_b9krJaIcuBM4lej3IyI5heVcY5A'

Copilot uses AI. Check for mistakes.
Comment on lines +215 to +217
# Remove parallel_tool_calls from data for now
# TODO: Implement parallel tool calls handling later
parallel_tool_calls = data.pop("parallel_tool_calls", False)
Copy link

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

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

The parallel_tool_calls parameter is removed with a TODO comment, but it's still documented and used in other parts of the codebase. Consider either implementing this feature or updating documentation to reflect its current unsupported status.

Suggested change
# Remove parallel_tool_calls from data for now
# TODO: Implement parallel tool calls handling later
parallel_tool_calls = data.pop("parallel_tool_calls", False)
# parallel_tool_calls parameter is not currently supported
# TODO: Implement parallel tool calls handling if/when supported

Copilot uses AI. Check for mistakes.
@Linked-Liszt Linked-Liszt merged commit c376b04 into main Aug 11, 2025
1 check passed
@Linked-Liszt Linked-Liszt deleted the feature/tool-calling branch September 30, 2025 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants