Extend ai-proxy Plugin to Support OpenAI Response API Protocol with Remote MCP Server Tool Calling
#2,483 opened on Jun 23, 2025
Repository metrics
- Stars
- (9,036 stars)
- PR merge metrics
- (Avg merge 7d 9h) (18 merged PRs in 30d)
Description
Background
OpenAI has implemented agent logic in its Response API, supporting tool calling through remote MCP (Model Context Protocol) servers. Higress currently supports MCP server hosting and multiple AI model providers, but needs to extend the ai-proxy plugin to implement OpenAI's Response API protocol .
Requirements
- Extend Response API Support: Implement OpenAI's
/v1/responsesAPI protocol in theai-proxyplugin - MCP Tool Calling Integration: Support tool calling through remote MCP servers, leveraging existing MCP server hosting capabilities
- Multi-Model Support: Enable routing tool calling requests to non-OpenAI models (such as Qwen, Claude, Gemini, etc.) through existing model mapping mechanisms
Technical Implementation Points
- The
ApiNameResponsesis already defined in theApiNameenumeration - Leverage existing provider architecture to support multi-model switching
- Integrate existing MCP server hosting capabilities
- Implement OpenAI protocol to other model conversion through model mapping configuration
Expected Benefits
- Provide unified AI Agent tool calling interface
- Support Agent capabilities for more model providers
- Enhance Higress AI Gateway's competitiveness and ecosystem compatibility
Related Code Locations
- Main implementation location:
plugins/wasm-go/extensions/ai-proxy/ - Provider interface:
plugins/wasm-go/extensions/ai-proxy/provider/provider.go - MCP servers:
plugins/wasm-go/mcp-servers/
Notes
Higress already has the foundational architecture to implement this feature: including a comprehensive provider system, MCP server hosting capabilities, and model mapping mechanisms. The main work involves extending the Response API protocol implementation and tool calling logic based on the existing framework.