Skip to content

Conversation

@peterj
Copy link
Collaborator

@peterj peterj commented Oct 20, 2025

… (fixes tool call to github mcp server fails #976)

… (fixes tool call to github mcp server fails #976)

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
@peterj peterj marked this pull request as ready for review October 20, 2025 11:47
Copilot AI review requested due to automatic review settings October 20, 2025 11:47
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 ensures tasks are serialized with JSON-compatible types before being sent to the API, addressing failures when calling the GitHub MCP server (issue #976).

  • Switches Task serialization to model_dump(mode="json") for API POSTs.
  • Maintains existing error handling via response.raise_for_status().

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

Comment on lines 28 to +31
Raises:
httpx.HTTPStatusError: If the API request fails
"""
response = await self.client.post("/api/tasks", json=task.model_dump())
response = await self.client.post("/api/tasks", json=task.model_dump(mode="json"))
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider updating the method docstring to note that the task is serialized using model_dump(mode='json') to ensure JSON-compatible types are sent to the API. This clarifies the intent for future maintainers and aligns the docs with behavior.

Copilot uses AI. Check for mistakes.
@EItanya EItanya merged commit 87dbb78 into main Oct 20, 2025
16 checks passed
@EItanya EItanya deleted the peterj/fixanyjson branch October 20, 2025 15:12
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