test(e2e): add spark conformance cases for ai-proxy#4151
Open
123123213weqw wants to merge 1 commit into
Open
Conversation
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>
123123213weqw
requested review from
2456868764,
CH3CHO and
Xunzhuo
as code owners
July 16, 2026 04:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ⅰ. Describe what this PR did
Add non-streaming and streaming e2e conformance cases for the
spark(Xunfei) ai-proxy provider intest/e2e/conformance/tests/go-wasm-ai-proxy.{go,yaml}. These exercise spark's native response shape (acode/message/sidenvelope wrapping OpenAI-stylechoices/usage) and theresponseSpark2OpenAItransform 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
:latestllm-mock-serverimage 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.goalready implements the Spark<->OpenAI transform; this PR only adds e2e coverage, no provider changes. The non-streaming case asserts the converted OpenAI body (ignoringid/created/usage); the streaming case asserts thetext/event-streamcontent type, consistent with the other providers whose mock emits a freshcreatedper chunk.