feat(models): restrict trinity thinking free to kiloclaw and openclaw#2385
Merged
chrarnoldus merged 7 commits intomainfrom Apr 14, 2026
Merged
feat(models): restrict trinity thinking free to kiloclaw and openclaw#2385chrarnoldus merged 7 commits intomainfrom
chrarnoldus merged 7 commits intomainfrom
Conversation
Add exclusive_to field to KiloExclusiveModel to restrict model access by feature. Set exclusive_to ['kiloclaw', 'openclaw'] for trinity large thinking free. Filter excluded models from /models endpoints when feature header is set. Block proxy requests with 403 when feature does not match, suggesting kilo-auto/free as an alternative.
Contributor
Author
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Other Observations (not in diff)
Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · 579,559 tokens |
…interpolate features in error - Make exclusive_to non-optional on KiloExclusiveModel (empty array = no restriction); add exclusive_to: [] to all existing model definitions - Extract filterByFeature() helper to replace repeated inline filter expressions - Pass exclusive_to values to featureExclusiveModelResponse so the error message interpolates the allowed feature names instead of hard-coding them
… add model id to message
markijbema
approved these changes
Apr 14, 2026
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.
Summary
exclusive_to: ReadonlyArray<FeatureValue>field toKiloExclusiveModel(required; empty array means no restriction). All existing models getexclusive_to: [].exclusive_to: ['kiloclaw', 'openclaw']on trinity large thinking free so it is only available to KiloClaw/OpenClaw clients.filterByFeature(models, feature)helper used by both/modelsendpoints to remove models whoseexclusive_tolist does not include the request's feature header. Models are always included when no feature header is sent (backwards-compatible for clients that don't set the header).exclusive_torestriction does not match; the error message interpolates the allowed feature values and suggestskilo-auto/freeas a free alternative.preferredModels, so no removal was necessary.Verification
Visual Changes
N/A
Reviewer Notes
isExcludedForFeaturereturnsfalse(include the model) whenfeatureisnull(no header) — intentional per spec since not all clients set the header.filterByFeature/isExcludedForFeatureonly checkkiloExclusiveModels.