test(bdd): invoke an LLM function in the single-cluster helmfile feature - #1055
test(bdd): invoke an LLM function in the single-cluster helmfile feature#1055along-2017 wants to merge 2 commits into
Conversation
Add an @llm-function-type scenario after the echo function lifecycle: create a function of type LLM backed by the OpenAI-compatible sample image, deploy it, invoke a chat completion through the LLM gateway, and assert an unauthenticated gateway request returns 401. The wiring test seeds canned invoke and curl results and asserts the LLM create, invoke, and no-auth commands ran. Relates to #1019 Signed-off-by: along <along@nvidia.com>
Strengthen the invoke assertion with a choices check, assert the curl exit code, correct the comment describing the LLM Host-header routing, and document why the gateway invoke has no poll duration. Relates to #1019 Signed-off-by: along <along@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe BDD tests add an OpenAI-compatible LLM function lifecycle. They verify deployment configuration, API-key generation, synchronous invocation, response validation, and HTTP 401 rejection for unauthenticated gateway requests. ChangesLLM gateway testing
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The PR adds coverage for LLM invocation and gateway authentication without changing product runtime code. The live scenario depends on publishing and pulling the sample image first, so it is mergeable with explicit owner follow-up to verify that dependency before live execution. Sequence Diagram(s)sequenceDiagram
participant BDDScenario
participant FakeRunner
participant LLMGateway
BDDScenario->>FakeRunner: create and deploy LLM function
BDDScenario->>LLMGateway: invoke chat-completions endpoint with API key
LLMGateway-->>BDDScenario: synchronous OpenAI-compatible response
BDDScenario->>LLMGateway: invoke gateway without API key
LLMGateway-->>BDDScenario: HTTP 401
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Why
The single-cluster Helmfile feature installs the LLM gateway and
router but never routes a request through them. A regression that
leaves the releases deployed while the serve path is broken passes
the suite. This adds the first LLM-type function coverage.
What changed
@llm-function-type scenario after the echo function lifecycle. It
creates a function of type LLM backed by the OpenAI-compatible
sample image, deploys it, invokes a chat completion through the LLM
gateway asserting the response envelope, and asserts an
unauthenticated gateway request returns 401. Existing DSL steps
only.
LLM invoke and the curl check, and asserts the LLM create, invoke,
and no-auth commands ran.
Customer Release Notes
Not customer visible.
Plan Summary
Not applicable
Usage
Not applicable
Testing
scenario against the fake runner); go vet green.
nvcf-openai-compatible-sample:1.0.0 under the sample org/team, which
must be published as a multi-arch tag first. The live run happens
once the image exists; the invoke content assertion is tightened
then.
Notes
The image tag 1.0.0 is a placeholder for the first published
multi-arch tag; update the scenario if the published tag differs.
References
Relates to #1019
Related Pull Requests
None
Dependencies
None
Summary by CodeRabbit