higress-group/higress

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

Aperta

#2483 aperta il 23 giu 2025

 (2 commenti) (2 reazioni) (0 assegnatari)Go (1219 fork)github user discovery
area/aihelp wantedlevel/challengesig/wasm

Metriche repository

Star
 (9036 stelle)
Metriche merge PR
 (Merge medio 7g 9h) (18 PR mergiate in 30 g)

Descrizione

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.

Guida contributor