Skip to content

feat(openai): support deferred resolution for configured MCP connectors - #933

Open
mkoushni wants to merge 8 commits into
praxis-proxy:mainfrom
mkoushni:feat/703-deferred-mcp-connectors
Open

feat(openai): support deferred resolution for configured MCP connectors#933
mkoushni wants to merge 8 commits into
praxis-proxy:mainfrom
mkoushni:feat/703-deferred-mcp-connectors

Conversation

@mkoushni

@mkoushni mkoushni commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Praxis connector_id values are pipeline-local. Accepting defer_loading: true without an ownership model would have forwarded those IDs to the inference backend.

  • openai_mcp_tool_resolve accepts deferred configured connectors when the request includes tool_search, injects the configured URL in-memory only, skips eager tools/list, and rewrites the backend body to a sanitized type: mcp stub (no connector_id, URL, authorization, or headers).
  • openai_agentic_loop extracts tool_search_call into request state (not backend messages).
  • openai_mcp_dispatch loads every pending deferred connector on tool_search_call, then dispatches through the existing tools/call path.
  • Discovery is transactional: list all connectors first, then apply name-collision and max_rewritten_body_bytes checks before mutating mcp_tool_map or output. Failures restore pending connectors.
  • Unknown IDs and connector_id + server_url still 400 before outbound activity. Eager connectors and direct server_url are unchanged.

The first inference round still sends the sanitized type: mcp stub plus tool_search; the backend must accept those OpenAI hosted-tool shapes. Any tool_search_call loads every pending deferred connector.

Closes #703

Validation

  • cargo test -p praxis-ai-apis --lib -- openai_mcp_tool_resolve agentic_loop mcp_dispatch (316 passed)
  • cargo test -p praxis-tests-integration --test suite -- deferred_connector mixed_eager (5 passed)
  • cargo clippy -p praxis-ai-apis --all-targets -- -D warnings
  • make lint

Checklist

  • I reviewed every changed line and can explain the change.
  • New capabilities include an example config and functional example test.
  • User-facing behavior and generated documentation are updated.
  • Commits are signed and include a Signed-off-by trailer.

Breaking changes

None. Deferred connector_id was previously rejected; it is now accepted only with tool_search and an agentic MCP dispatch loop.

@mkoushni
mkoushni requested review from a team and leseb September 6, 2026 15:41
@praxis-bot-app

praxis-bot-app Bot commented Sep 6, 2026

Copy link
Copy Markdown

Missing Signed-off-by: 8998839. All commits require sign-off (via git commit --signoff).

Praxis connector_id values are pipeline-local, so deferred MCP entries
are resolved in-memory, stripped from the backend body, and listed only
after a tool_search_call instead of forwarding internal IDs to inference.

Signed-off-by: mkoushni <mkoushni@redhat.com>
@mkoushni
mkoushni force-pushed the feat/703-deferred-mcp-connectors branch from 8998839 to c3779ff Compare September 6, 2026 15:43
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.

feat(openai): support deferred resolution for configured MCP connectors

1 participant