Skip to content

feat(connectors): add direct gateway calls - #623

Closed
verdie-g wants to merge 2 commits into
mainfrom
design/connectors-gateway-client
Closed

verdie-g wants to merge 2 commits into
mainfrom
design/connectors-gateway-client

Conversation

@verdie-g

@verdie-g verdie-g commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add call_mcp_tool_async for stateless MCP tool calls through the connectors gateway
  • add call_http_endpoint_async for relative httpx.Request objects, returning the raw httpx.Response
  • reuse the SDK's configured async HTTP client and API authentication
  • support named connector credentials on both methods

Behavior

  • absolute HTTP request URLs and dot-segment traversal are rejected
  • redirects and automatic retries are disabled for direct gateway calls
  • caller-provided HTTP Authorization headers are preserved
  • MCP results are converted to the existing ConnectorToolCallResponse model
  • no optional MCP client dependency is required

Testing

  • src/mistralai/extra/tests/test_connectors_gateway.py: 9 passed
  • custom-code lint suite: mypy, pyright, and ruff passed
  • extra test suite excluding one GC-order-sensitive test: 345 passed, 12 subtests passed
  • the deselected GC cleanup test passes independently

verdie-g and others added 2 commits September 14, 2026 18:11
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@andreaonofrei01

Copy link
Copy Markdown
Contributor

hello sir, if possible bring this to the monorepo client-python because everything in this repo gets overwritten(because of the move to the monorepo)

@verdie-g

Copy link
Copy Markdown
Contributor Author

Closing in favor of moving this change to the monorepo, as requested in review.

@verdie-g verdie-g closed this Sep 15, 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