Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

send_chat_history_messages was short-circuiting and returning success without calling the API when the message list was empty. Empty lists should still be sent to the generic API for threat protection tracking.

Changes

Core service (mcp_tool_server_configuration_service.py):

  • Removed early return when chat_history_messages is empty

OpenAI extension (mcp_tool_registration_service.py):

  • Removed early return when input messages is empty
  • Removed early return when converted chat_history_messages is empty

AgentFramework extension (mcp_tool_registration_service.py):

  • Removed early return when chat_messages is empty
  • Removed early return when converted history_messages is empty

Documentation & Tests:

  • Updated docstrings to clarify empty lists are valid
  • Updated tests to verify empty lists are sent to API

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • il-1234567812345678123456781234567.8.tenant.api.powerplatform.com
    • Triggering command: /home/REDACTED/work/Agent365-python/Agent365-python/.venv/bin/pytest pytest tests/ -v --tb=short -m not integration (dns block)
  • il-testtenan.t.tenant.api.powerplatform.com
    • Triggering command: /home/REDACTED/work/Agent365-python/Agent365-python/.venv/bin/pytest pytest tests/ -v --tb=short -m not integration (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

On mcp_tool_registration_service.py, In send_chat_history_messages, if messages is empty we should still send that empty list/array to the generic API. Same with chat_history_messages - that can also be empty. Please fix these bugs and make sure that documentation and tests are updated to reflect this.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 27, 2026 06:47
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bugs related to sending empty message arrays Fix send_chat_history_messages to send empty lists to API Jan 27, 2026
Copilot AI requested a review from pontemonti January 27, 2026 06:51
@pontemonti
Copy link
Contributor

This got duplicated by accident. Being addressed through #145

@pontemonti pontemonti closed this Jan 27, 2026
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.

2 participants