higress-group/higress

Extend ai-proxy Plugin to Support OpenAI Response API Protocol with Remote MCP Server Tool Calling

Open

#2,483 opened on Jun 23, 2025

 (2 comments) (2 reactions) (0 assignees)Go (1,219 forks)github user discovery
area/aihelp wantedlevel/challengesig/wasm

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

  1. Extend Response API Support: Implement OpenAI's /v1/responses API protocol in the ai-proxy plugin
  2. MCP Tool Calling Integration: Support tool calling through remote MCP servers, leveraging existing MCP server hosting capabilities
  3. 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 ApiNameResponses is already defined in the ApiName enumeration
  • 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.

Contributor guide