Repository navigation
[AISAGE-707] feat(ai-gateway): support public custom LLMs - #8294
chrarnoldus wants to merge 2 commits into
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummarySince the last review the PR branch was rebased onto newer Files Reviewed (25 files)
Previous Review Summaries (2 snapshots, latest commit 6224eac)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6224eac)Status: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commit Files Reviewed (7 files)
Previous review (commit aea7028)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (25 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 34.8K · Output: 6.7K · Cached: 331.1K Review guidance: REVIEW.md from base branch |
6224eac to
dd3b240
Compare
Summary
Kilo admins can now publish a custom LLM to every user, signed in or not. This builds on #7780, which made custom LLM routing fail closed, and #7778, which made custom LLMs free. It replaces #7291.
Definition schema
public: new field,public: { inference_providers: string[] }.organization_idsorgroup_ids.description: required whenpublicis set, optional otherwise. Private custom LLMs fall back to the existing disclaimer.organization_ids: optional, but still required unlesspublicis set.Routing and policy
getProviderserves a public custom LLM to every caller, including anonymous ones.bypassAccessCheck, so organization and group policy apply as for any model. They are never exempt from model policy, because no organization or group grant applies to them.public.inference_providers, through the newgetModelInferenceProviderRestriction.provider.only/provider.ignoreexcludes every declared provider gets a 403 (checkInferenceProvidersAllowed).Reusing Kilo-exclusive ids
lookupCustomLlmreportsunknownfor Kilo-exclusive ids a custom LLM could claim (no:or~) while the custom LLM catalog cannot be read and nothing is cached. The request gets a 503 instead of falling back to the exclusive model.unknownlookup, is pinned to none, so policy denies it for anyone without a grant.Catalog and snapshot
isFree,isCustomLlmandinference_provider_ids. OpenRouter and Kilo-exclusive entries with the same id are hidden.listAvailableCustomLlmsonly lists private custom LLMs.isCustomLlmkeeps public custom LLMs out of the same places as private ones: auto-routing pools, the router and default model pickers, and Organization Auto targets.Admin UI
listreturns the Kilo-exclusive ids for this.Verification
@kilocode/dband@kilocode/web-shared.apps/webtypecheck runs out of memory in the sandbox, so CI is the first full check.oxlintandoxfmtpass on changed files.Visual Changes
The admin Custom LLMs page has a new Access column with badges, updated help text, and a confirmation dialog for public or Kilo-exclusive-replacing saves. I took no screenshots.
Reviewer Notes
inference_providersfrom the definition, so it does not wait for the sync.providerfield: when organization policy narrows providers,provider.onlyis forwarded to the custom upstream in the request body, as organization privacy settings already are. Useremove_from_bodyif an upstream rejects the field.