block creating new versions from built-in LLM provider templates#2764
Conversation
📝 WalkthroughWalkthroughDefault LLM provider templates now use ChangesLLM provider template lifecycle
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@platform-api/resources/openapi.yaml`:
- Around line 1123-1126: Update the copy-operation examples in the OpenAPI
documentation to use the reserved built-in template handle namespace, replacing
openai-v3-0 and openai-v4-0 with corresponding wso2-openai-* handles. If these
examples are intended to represent custom templates, explicitly label them as
such instead.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fbeb8353-1883-4818-b9c9-58f68fbb303a
📒 Files selected for processing (28)
gateway/gateway-controller/default-llm-provider-templates/anthropic-template.yamlgateway/gateway-controller/default-llm-provider-templates/awsbedrock-template.yamlgateway/gateway-controller/default-llm-provider-templates/azureaifoundry-template.yamlgateway/gateway-controller/default-llm-provider-templates/azureopenai-template.yamlgateway/gateway-controller/default-llm-provider-templates/gemini-template.yamlgateway/gateway-controller/default-llm-provider-templates/mistral-template.yamlgateway/gateway-controller/default-llm-provider-templates/openai-template.yamlplatform-api/internal/apperror/catalog.goplatform-api/internal/apperror/codes.goplatform-api/internal/constants/constants.goplatform-api/internal/repository/interfaces.goplatform-api/internal/repository/llm.goplatform-api/internal/service/llm.goplatform-api/internal/service/llm_provider_template_test.goplatform-api/resources/default-llm-provider-templates/anthropic-template.yamlplatform-api/resources/default-llm-provider-templates/awsbedrock-template.yamlplatform-api/resources/default-llm-provider-templates/azureaifoundry-template.yamlplatform-api/resources/default-llm-provider-templates/azureopenai-template.yamlplatform-api/resources/default-llm-provider-templates/gemini-template.yamlplatform-api/resources/default-llm-provider-templates/mistral-template.yamlplatform-api/resources/default-llm-provider-templates/openai-template.yamlplatform-api/resources/openapi.yamlportals/ai-workspace/src/pages/appShell/appShellPages/providerTemplate/CreateProviderTemplate.tsxportals/ai-workspace/src/pages/appShell/appShellPages/providerTemplate/ProviderTemplateOverview.tsxportals/ai-workspace/src/pages/appShell/appShellPages/serviceProvider/ProvidersList.tsxportals/ai-workspace/src/pages/appShell/appShellPages/serviceProvider/ServiceProviderOverview.tsxportals/ai-workspace/src/pages/appShell/appShellPages/serviceProvider/ServiceProvidersSummaryCard.tsxportals/ai-workspace/src/utils/providerTemplateDisplay.ts
259bb0b to
612d9d7
Compare
Purpose
Built-in LLM provider templates should be immutable, and new versions are added only by WSO2 via the seed data. Previously, users could add versions directly to a built-in family. This PR blocks that, and users can copy a built-in into their own custom template instead.
Changes
CreateVersionnow rejects built-in (wso2) template families with a newLLMProviderTemplateBuiltInImmutableerror (HTTP 403).wso2-group_id namespace for built-in templates.UI Changes
Resolves: #2763