-
Notifications
You must be signed in to change notification settings - Fork 60
test(rlsapi): add initial e2e test for v1 infer endpoint #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
major
wants to merge
1
commit into
lightspeed-core:main
Choose a base branch
from
major:rlsapi-v1-e2e
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
24 changes: 24 additions & 0 deletions
24
tests/e2e/configuration/library-mode/lightspeed-stack-rlsapi.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Library mode - embeds llama-stack as library | ||
| use_as_library_client: true | ||
| library_client_config_path: run.yaml | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| # Configure default model/provider for rlsapi v1 endpoint | ||
| # These are set per-environment in the CI workflow | ||
| default_provider: ${env.E2E_DEFAULT_PROVIDER:=openai} | ||
| default_model: ${env.E2E_DEFAULT_MODEL:=gpt-4o-mini} |
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
25 changes: 25 additions & 0 deletions
25
tests/e2e/configuration/server-mode/lightspeed-stack-rlsapi.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Server mode - connects to separate llama-stack service | ||
| use_as_library_client: false | ||
| url: http://llama-stack:8321 | ||
| api_key: xyzzy | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
| authentication: | ||
| module: "noop" | ||
| inference: | ||
| # Configure default model/provider for rlsapi v1 endpoint | ||
| # These are set per-environment in the CI workflow | ||
| default_provider: ${env.E2E_DEFAULT_PROVIDER:=openai} | ||
| default_model: ${env.E2E_DEFAULT_MODEL:=gpt-4o-mini} |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| @RlsapiConfig | ||
| Feature: RLSAPI v1 infer endpoint | ||
| Basic tests for the RLSAPI v1 inference endpoint. | ||
|
|
||
| Background: | ||
| Given The service is started locally | ||
| And REST API service prefix is /v1 | ||
|
|
||
| Scenario: Verify RLSAPI v1 infer endpoint returns 200 | ||
| Given The system is in default state | ||
| When I access REST API endpoint "infer" using HTTP POST method | ||
| """ | ||
| {"question": "Say hello"} | ||
| """ | ||
| Then The status code of the response is 200 | ||
| And Content type of response should be set to "application/json" |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the echo statement to display the correct values.
The echo statement on Line 188 won't display the correct values because variables written to
GITHUB_ENVare not available in the current shell context. The variables$E2E_DEFAULT_PROVIDERand$E2E_DEFAULT_MODELwill expand to empty strings or stale values from previous steps.Apply this diff to fix the logging:
case "${{ matrix.environment }}" in ci) echo "E2E_DEFAULT_PROVIDER=openai" >> $GITHUB_ENV echo "E2E_DEFAULT_MODEL=gpt-4o-mini" >> $GITHUB_ENV + echo "✅ Set E2E_DEFAULT_PROVIDER=openai and E2E_DEFAULT_MODEL=gpt-4o-mini" ;; azure) echo "E2E_DEFAULT_PROVIDER=azure" >> $GITHUB_ENV echo "E2E_DEFAULT_MODEL=gpt-4o-mini" >> $GITHUB_ENV + echo "✅ Set E2E_DEFAULT_PROVIDER=azure and E2E_DEFAULT_MODEL=gpt-4o-mini" ;; vertexai) echo "E2E_DEFAULT_PROVIDER=google-vertex" >> $GITHUB_ENV echo "E2E_DEFAULT_MODEL=gemini-2.0-flash-exp" >> $GITHUB_ENV + echo "✅ Set E2E_DEFAULT_PROVIDER=google-vertex and E2E_DEFAULT_MODEL=gemini-2.0-flash-exp" ;; *) echo "⚠️ Unknown environment: ${{ matrix.environment }}, using defaults" echo "E2E_DEFAULT_PROVIDER=openai" >> $GITHUB_ENV echo "E2E_DEFAULT_MODEL=gpt-4o-mini" >> $GITHUB_ENV + echo "✅ Set E2E_DEFAULT_PROVIDER=openai and E2E_DEFAULT_MODEL=gpt-4o-mini (fallback)" ;; esac - echo "✅ Set E2E_DEFAULT_PROVIDER=${E2E_DEFAULT_PROVIDER} and E2E_DEFAULT_MODEL=${E2E_DEFAULT_MODEL}"📝 Committable suggestion
🤖 Prompt for AI Agents