#4838·higress

ai-proxy: groq provider does not recognize /openai/v1/responses under protocol: original (request skipped as unsupported path)

Author: 123123213weqwCreated Sep 29, 2026Updated Sep 29, 2026

Summary

With protocol: original, requests to the groq provider's Responses API endpoint (/openai/v1/responses) are misclassified: groqProvider.GetApiName() only recognizes the chat-completions path and returns an empty ApiName, so the plugin treats the request as an unsupported path and skips all request/response body processing.

Environment

  • Higress commit: b44d4f77011ad7f63c2fefef5b8cd2dec0cff1c6 (current main, 2026-09-28)
  • Plugin: ai-proxy (wasm-go), provider groq

Configuration

yaml
apiVersion: extensions.higress.io/v1alpha1
kind: WasmPlugin
metadata:
  name: ai-proxy-groq-original
spec:
  defaultConfig:
    provider:
      apiTokens:
        - "<gsk-api-key>"
      protocol: original
      type: groq
  url: file:///opt/plugins/wasm-go/extensions/ai-proxy/plugin.wasm

Steps to reproduce

  1. Install Higress with the ai-proxy plugin using the config above, routed to api.groq.com.
  2. Send a groq Responses API request through the gateway (groq serves the OpenAI-compatible API under /openai/v1):
bash
curl -X POST http://<gateway>/openai/v1/responses \
  -H "Content-Type: application/json" \
  -d '{"model":"llama-3.3-70b-versatile","input":"Hello"}'

Expected behavior

GetApiName("/openai/v1/responses") returns ApiNameResponses — the capability that groqProviderInitializer.DefaultCapabilities() itself declares — and the request/response bodies are processed accordingly.

Actual behavior

groqProvider.GetApiName() (plugins/wasm-go/extensions/ai-proxy/provider/groq.go:73) only matches groqChatCompletionPath (/openai/v1/chat/completions) and returns "" for /openai/v1/responses. Under protocol: original the provider-specific GetApiName is the resolver (plugins/wasm-go/extensions/ai-proxy/main.go:243-249), so apiName ends up empty and onHttpRequestHeader takes the unsupported-path branch (main.go:274-278):

  • DontReadRequestBody() / DontReadResponseBody() are called — no body processing happens at all,
  • a warning is logged: unsupported path: /openai/v1/responses, will not process http path and body.

Why this is a defect rather than an unsupported case

groqProviderInitializer.DefaultCapabilities() (groq.go:29-34) declares:

go
string(ApiNameResponses): groqResponsesPath, // "/openai/v1/responses"

so the provider advertises a Responses-API capability that its own path resolver can never detect — GetApiName can never return ApiNameResponses.

Notes

  • The behavior above is a deterministic trace of the production request path (onHttpRequestHeader) on the cited main commit; happy to attach a runtime-confirmed conformance case against llm-mock-server if that is preferred.
  • Proposed fix: #4217