Skip to content

test(e2e): add spark conformance cases for ai-proxy#4151

Open
123123213weqw wants to merge 1 commit into
higress-group:mainfrom
123123213weqw:e2e-spark-ai-proxy
Open

test(e2e): add spark conformance cases for ai-proxy#4151
123123213weqw wants to merge 1 commit into
higress-group:mainfrom
123123213weqw:e2e-spark-ai-proxy

Conversation

@123123213weqw

Copy link
Copy Markdown

Ⅰ. Describe what this PR did

Add non-streaming and streaming e2e conformance cases for the spark (Xunfei) ai-proxy provider in test/e2e/conformance/tests/go-wasm-ai-proxy.{go,yaml}. These exercise spark's native response shape (a code/message/sid envelope wrapping OpenAI-style choices/usage) and the responseSpark2OpenAI transform path.

Ⅱ. Does this pull request fix one issue?

Fixes #1721.

Ⅲ. Why don't you add test cases (unit test/integration test)?

This PR itself adds the e2e conformance test cases for the spark provider.

Ⅳ. Describe how to verify it

Run the ai-proxy conformance suite against a gateway backed by the llm-mock-server. The spark mock handler ships in the :latest llm-mock-server image via higress-group/mock-server#19 (pending) — the e2e cases will pass once that merges and the image is republished.

Ⅴ. Special notes for reviews

The ai-proxy provider/spark.go already implements the Spark<->OpenAI transform; this PR only adds e2e coverage, no provider changes. The non-streaming case asserts the converted OpenAI body (ignoring id/created/usage); the streaming case asserts the text/event-stream content type, consistent with the other providers whose mock emits a fresh created per chunk.

Add non-streaming and streaming e2e conformance cases for the spark (Xunfei) ai-proxy provider, exercising the native code/message/sid response shape and the responseSpark2OpenAI transform. The streaming case asserts the text/event-stream content type, consistent with the other providers whose mock emits a fresh created timestamp per chunk.

The mock-server side is provided by higress-group/mock-server#19 (spark handler). Fixes higress-group#1721.

Signed-off-by: 123123213weqw <1939455790@qq.com>
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.

Implement spark LLM mock server & e2e test case

1 participant