Skip to content

feat(admin): add custom LLM management panel#1924

Merged
chrarnoldus merged 4 commits intomainfrom
feat/admin-custom-llms
Apr 2, 2026
Merged

feat(admin): add custom LLM management panel#1924
chrarnoldus merged 4 commits intomainfrom
feat/admin-custom-llms

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Apr 2, 2026

Summary

  • Add admin panel at /admin/custom-llms to manage entries in the custom_llm2 table (add, edit, delete)
  • Uses Monaco Editor for JSON editing of the definition field with syntax highlighting
  • Zod validation against CustomLlmDefinitionSchema is performed client-side before saving
  • tRPC router with list, upsert, and delete procedures behind adminProcedure

Verification

  • tsgo --noEmit — 0 type errors
  • oxfmt --list-different . — formatting passes

Visual Changes

N/A (new admin page, no changes to existing UI)

Reviewer Notes

  • The custom_llm2 table already exists in the schema; no migration needed.
  • The upsert approach allows both creating new entries and updating existing ones by public_id.
  • Monaco Editor (@monaco-editor/react) was already a project dependency.
  • The definition field contains sensitive data (api_key) — this is an admin-only panel behind adminProcedure.

Add admin panel at /admin/custom-llms to manage custom_llm2 table entries.
Includes Monaco-based JSON editor with Zod validation against
CustomLlmDefinitionSchema before saving.
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 2, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

No new issues in the incremental diff.

Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
src/routers/admin/custom-llm-router.ts 14 Prefix validation still blocks deleting or repairing legacy custom_llm2 rows whose public_id lacks kilo-internal/.
Files Reviewed (1 file)
  • src/app/admin/custom-llms/page.tsx - 0 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.4-20260305 · 119,746 tokens

kilo-code-bot bot added 2 commits April 2, 2026 15:31
The provider routing code only resolves custom_llm2 entries when the
requested model starts with "kilo-internal/". Enforce this at the Zod
validation layer so admins cannot save unusable entries.
@chrarnoldus chrarnoldus merged commit 07ba648 into main Apr 2, 2026
19 checks passed
@chrarnoldus chrarnoldus deleted the feat/admin-custom-llms branch April 2, 2026 19:02
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.

2 participants