Skip to content

Enhance LLM deployment tests and update ServiceProviderNew component to handle optional API key authentication - #3038

Merged
Thushani-Jayasekera merged 3 commits into
wso2:mainfrom
Thushani-Jayasekera:fix-apikey
Jul 30, 2026
Merged

Enhance LLM deployment tests and update ServiceProviderNew component to handle optional API key authentication#3038
Thushani-Jayasekera merged 3 commits into
wso2:mainfrom
Thushani-Jayasekera:fix-apikey

Conversation

@Thushani-Jayasekera

@Thushani-Jayasekera Thushani-Jayasekera commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Provider creation now conditionally constructs upstream authentication payloads based on credential presence and auth type. Cypress snackbar assertions use recorded notifications, gateway version defaults use LTS, and a backend test verifies API-key value preservation.

Changes

Provider authentication handling

Layer / File(s) Summary
Conditional provider auth payload construction
portals/ai-workspace/src/pages/appShell/appShellPages/ServiceProviderNew.tsx
handleCreateProvider emits auth fields based on credential presence and selected auth type.
API-key preservation test
platform-api/internal/service/llm_deployment_test.go
Adds coverage for preserving API-key types and literal or secret-placeholder values during mapping.

Snackbar assertion reliability

Layer / File(s) Summary
Snackbar recording and matching commands
portals/ai-workspace/cypress/support/commands.js
Adds Cypress commands that record snackbar text and assert substring or regular-expression matches with retrying.
Secret-management failure assertions
portals/ai-workspace/cypress/e2e/001-providers/*, portals/ai-workspace/cypress/e2e/002-mcp-proxies/*
Updates provider, LLM proxy, and MCP failure tests to use recorded snackbar assertions after failed secret requests.

Gateway channel defaults

Layer / File(s) Summary
Gateway version channel configuration
portals/ai-workspace/configs/config*.toml, portals/ai-workspace/src/config.env.ts
Changes the gateway version 1.2 channel from STS to LTS in workspace defaults.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: lasanthas, renuka-fernando, anugayan, arshardh

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only lists issue links and a placeholder subject, and omits the required Purpose, Goals, Approach, testing, and other template sections. Fill in the full template with Purpose, Goals, Approach, User stories, Documentation, Automation tests, Security checks, Samples, Related PRs, and Test environment details.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main changes: LLM deployment test updates and optional API key auth handling in ServiceProviderNew.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@renuka-fernando

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 30, 2026
@Thushani-Jayasekera
Thushani-Jayasekera merged commit 7b34e22 into wso2:main Jul 30, 2026
10 of 18 checks passed
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.

3 participants