Repository navigation
feat(ai-gateway): support public custom LLMs - #7291
chrarnoldus wants to merge 12 commits into
Conversation
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe highest-risk issue is that custom LLM credential decryption and Google token exchange still throw out of Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (16 files)
Notes: the previous review SHA was not present in this checkout, so I fell back to a full review of Fix these issues in Kilo Cloud Previous Review Summaries (6 snapshots, latest commit 78a9294)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 78a9294)Status: No Issues Found | Recommendation: Merge Executive SummaryThe only change since the previous review ( Files Reviewed (1 file)
Previous review (commit 8fa9c35)Status: No Issues Found | Recommendation: Merge Executive SummaryI re-verified every previously reported finding against current HEAD Files Reviewed (59 files)
Verification Notes
Previous review (commit 8c5f0f5)Status: 5 Issues Found | Recommendation: Address before merge Executive SummaryThe latest commit renames symbols without completing the refactor: Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (17 files)
Previous review (commit 96981e6)Status: No Issues Found | Recommendation: Merge Executive SummaryIncremental commit Files Reviewed (5 files)
Previous review (commit d84c835)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (6 files)
Fix these issues in Kilo Cloud Previous review (commit d2b1f5a)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (36 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 217.6K · Output: 45.8K · Cached: 6.8M Review guidance: REVIEW.md from base branch |
8c5f0f5 to
8fa9c35
Compare
78a9294 to
79cb0d3
Compare
…to kilo/custom-llms-free
…to kilo/custom-llms-free
…to kilo/custom-llms-free # Conflicts: # packages/web-shared/src/lib/ai-gateway/models.test.ts
1ec7a3a to
e720d8c
Compare
…/long-rotor-qeg # Conflicts: # packages/web-shared/src/lib/ai-gateway/handlers/llm-proxy.ts
Summary
Kilo admins can now publish a custom LLM to every user, signed in or not.
Depends on #7780 and #7778. This branch merges #7778, which is stacked on #7780. (#7772 was closed;
mainalready has the same change from #8091.) Once they land onmain, the diff shrinks to the feature itself.Definition schema
public: new field,public: { inference_providers: string[] }.organization_idsorgroup_ids.description: required whenpublicis set, optional otherwise.organization_ids: optional, but still required unlesspublicis set.Public IDs
kilo-internal/prefix requirement is dropped, along withCUSTOM_LLM_PREFIX. [AISAGE-707] refactor(ai-gateway): resolve custom LLMs by catalog lookup and fail closed #7780 already stopped relying on the prefix.GatewayModelIdSchema).:or~, or start withkilo/,kilo-auto/orkilocode/.Routing
getProviderchecks the custom LLM catalog first, throughlookupCustomLlm.Public custom LLMs
canUseCustomLlmtreats public custom LLMs as usable by everyone, so Cloud Agent balance eligibility also treats them as free.public.inference_providers.provider.only/provider.ignoreexcludes every declared provider gets a 403.isFree,isCustomLlmandinference_provider_ids. OpenRouter and Kilo-exclusive entries with the same ID are hidden.isCustomLlmkeeps public custom LLMs out of the same places as private ones: auto-routing pools, router and default model pickers, and Organization Auto targets.Admin UI
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, updated help text, and a confirmation dialog when a definition becomes public. 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.