Skip to content

feat(ui): add native LiteAdmin assistant - #42443

Merged
tin-berri merged 1 commit into
mainfrom
litellm_liteask_native
Sep 23, 2026
Merged

tin-berri merged 1 commit into
mainfrom
litellm_liteask_native

Conversation

@tin-berri

@tin-berri tin-berri commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Gateway admins cannot manage resources through dashboard chat

How it solves it:

  • Adds LiteAdmin using existing sessions and management APIs
  • Uses shared shadcn components and inline change reviews

User Flow

Before: admins use individual forms to inspect and update resources

  1. Sign in as a proxy admin and open the Teams page
  2. Find the team and inspect its budget
  3. Use the team's form to change its budget

After: admins can inspect and update resources in one conversation

  1. Sign in as a proxy admin and open the Teams page
  2. Open LiteAdmin, select a trusted model, and ask about the team
  3. Ask for a change and review its fields inside chat
  4. Choose Confirm change or Cancel, then see the result inline
  5. Ask a follow-up; completed and cancelled actions remain understood

Relevant issues

Changes

  • Composes the shared composer, model picker, Markdown, and shadcn primitives with official MessageScroller
  • Uses one ordered transcript for replies, reviews, action outcomes, and errors
  • Provides 29 typed operations through existing management APIs and the installed SDK tool loop
  • Scopes settings, conversations, and inference consent to the admin session and gateway
  • Keeps generated keys outside model results and warns about interrupted writes

Affected release

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required CI/CD checks
  • My PR's scope is as isolated as possible
  • I have received a Greptile Confidence Score of at least 4/5

Verified at 7469cb4766: 110 focused tests and make check pass. The naming update changes labels, accessibility text, the assistant prompt, symbols, module paths, and documentation; a normalized comparison confirms no other code changes

CI and automated reviews are running for the latest commit. The model-trust boundary remains documented below

Full-repository TypeScript checking retains inherited errors; the baseline comparison found no added diagnostics. Dashboard CI does not upload UI coverage to Codecov, so no coverage percentage is claimed

Screenshots / Proof of Fix

Local management gateway on 4582, inference on 4583, PostgreSQL, and liteask-model backed by real Bedrock Claude Sonnet 5 calls. Synthetic team 973085c6-c992-4fe2-be24-078a9e0f2f96 has budget $41 and spend $0

Before (238f434)

  1. Sign in as a proxy admin and open http://liteask.localhost:3585/teams/
  2. Observe the team's $41 budget and $0 spend, with no assistant entry point

Teams page without LiteAdmin

After (7469cb4)

  1. Sign in as a proxy admin and open http://liteask.localhost:3584/teams/
  2. Open LiteAdmin, choose liteask-model, and accept the configured local inference destination
  3. Send Read the current budget and spend for team 973085c6-c992-4fe2-be24-078a9e0f2f96. Reply in one sentence.
  4. Observe the answer reporting budget $41 and spend $0, with LiteAdmin in the widget header and Ask LiteAdmin… in the composer

LiteAdmin performing a real budget lookup

Type

New Feature

Caveats (if any)

Medium

  • Selected models receive filtered administrative lookup data
  • Requires a trusted model supporting function calling
  • Initial operations cover common fields, not every admin setting
  • Historical spend reports retain existing license requirements
  • Conversation history clears on page reload
  • Check resource state before retrying an interrupted write

Final Attestation

  • Tests cover confirmations, cancellation, session changes, routing, and secret isolation

Note

High Risk
Introduces admin-facing AI that can confirm gateway writes (keys, teams, users) using the live session, with cross-origin inference consent and projected lookup data sent to the chosen model.

Overview
Adds LiteAsk, a floating admin chat widget on the AI gateway dashboard for writable proxy admins. It loads UI settings and optional external inference URLs, requires explicit consent before sending the session to a different origin, and runs an SDK tool loop over ~29 typed management operations with inline review/confirm for writes.

Shared chat infrastructure is extended: createGatewayClient centralizes gateway auth headers (playground + LiteAsk), proxy settings move to getProxyUISettings via useProxySettingsQuery, and ChatMessageContent / Bubble primitives support MessageScroller-based transcripts with optional image stripping for admin answers.

Includes broad unit and integration tests for approvals, session/gateway changes, secret redaction, and action receipts in follow-up model context.

Reviewed by Cursor Bugbot for commit 0f97fa4. Bugbot is set up for automated code reviews on this repo. Configure here.

@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review this replacement, focusing on reused authentication, write confirmation, session changes, fixed API callbacks, and credential isolation

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review the current commit for session changes, confirmation handling, shared client compatibility, and generated credential isolation

@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the latest rename is internally consistent and no actionable new defect or outstanding previous finding remains.

Summary

Adds the native LiteAdmin assistant to the dashboard, enabling writable proxy administrators to inspect resources and review management changes through a model-driven conversation.

  • Integrates the assistant into the authenticated dashboard shell.
  • Adds typed management operations, confirmation and cancellation flows, action receipts, session isolation, and cross-origin inference consent.
  • Reuses shared chat, Markdown, composer, gateway-client, and shadcn primitives.
  • Consistently renames the feature from LiteAsk to LiteAdmin across module paths, symbols, labels, accessibility text, tests, prompts, query keys, and design documentation.
  • The three previous findings are resolved in the current code.

Reviews (13) · Last reviewed commit: "feat(ui): add native LiteAdmin assistant"

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from c4ab373 to 2696ede Compare September 22, 2026 07:49
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review commit 2696ede again. It adds explicit inference destination approval, URL validation, blocked redirects, and scope regression tests

@tin-berri

Copy link
Copy Markdown
Contributor Author

@cursor review Please review commit 2696ede, especially inference destination consent, session changes, redirect blocking, and the existing write confirmation flow

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri
tin-berri marked this pull request as ready for review September 22, 2026 18:01
@tin-berri
tin-berri requested a review from a team September 22, 2026 18:01
@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 2696ede to 14c1030 Compare September 22, 2026 18:51
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review 14c10300 again. It removes duplicate counters, fixes the bounded-recursion check, and moves write approval into chat

@tin-berri

Copy link
Copy Markdown
Contributor Author

@cursor review Please review 14c10300 for tool limits, inline confirmation, and session changes. The recursion exception has depth and cycle regression tests

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 14c1030 to 52060bf Compare September 22, 2026 19:11
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review 52060bf, including recoverable message admission, bounded assistant context, inline confirmations, and reuse of SDK history for action limits

@tin-berri

Copy link
Copy Markdown
Contributor Author

@cursor Please review 52060bf. The oversized-message fix prevents invalid drafts entering history and bounds prior assistant context while retaining displayed replies

@cursor

cursor Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review 52060bf, especially corrected draft admission, bounded assistant context, and preserved inline write confirmation

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri

Copy link
Copy Markdown
Contributor Author

Remaining proxy-infra failures match main’s ten tokenizer failures after #42517. All 27 required checks pass; Greptile 5/5, Bugbot and Veria are clean

@tin-berri
tin-berri enabled auto-merge (squash) September 22, 2026 20:12
@tin-berri
tin-berri disabled auto-merge September 22, 2026 21:01
@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 52060bf to 85228dc Compare September 22, 2026 21:35
@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

Please review d445802c8b for session interruption, inline confirmation, shared component behavior, and generated-key handling in the rebuilt assistant

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from d445802 to 6f390d6 Compare September 22, 2026 23:02
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review 6f390d610f, including gateway-scoped settings caching, the worker-switch regression, and visible inline approval controls

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run
Please review 6f390d610f for gateway changes, interrupted writes, inline approval lifecycle, credential isolation, and shared component regressions

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 6f390d6 to 73dc3a1 Compare September 22, 2026 23:13
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review 73dc3a1d58; the final change updates the logout test to mock the shared settings API

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run
Please review 73dc3a1d58; this amendment only aligns the navbar logout test mock with the shared settings API

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 73dc3a1 to 6504150 Compare September 22, 2026 23:20
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review 65041508b8; compact chat now uses one MessageScroller following policy, eliminating competing user anchors and timing overrides

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run
Please review 65041508b8, which removes competing transcript anchors while preserving inline approval focus, cancellation, and existing session behavior

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 6504150 to 0f97fa4 Compare September 22, 2026 23:29
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review 0f97fa4; subsequent model turns now include safe action outcomes, with cancellation, completion, and uncertainty regression coverage

@tin-berri

Copy link
Copy Markdown
Contributor Author

bugbot run
Please review 0f97fa4 for conversation outcome ordering and generated-key exclusion; explicit receipts now preserve completed, cancelled, and unknown actions

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0f97fa4. Configure here.

@tin-berri
tin-berri force-pushed the litellm_liteask_native branch from 0f97fa4 to 7469cb4 Compare September 23, 2026 00:20
@tin-berri tin-berri changed the title feat(ui): add native LiteAsk admin assistant feat(ui): add native LiteAdmin assistant Sep 23, 2026
@tin-berri

Copy link
Copy Markdown
Contributor Author

@greptileai @cursor review Please review 7469cb4, which consistently renames LiteAsk to LiteAdmin across labels, symbols, tests, and documentation

@tin-berri
tin-berri merged commit 5b287f6 into main Sep 23, 2026
95 of 96 checks passed
@tin-berri
tin-berri deleted the litellm_liteask_native branch September 23, 2026 01:06
yuneng-berri added a commit that referenced this pull request Sep 24, 2026
…43033)

#42443 pins a floating LiteAdmin button to the bottom-right corner, where it covers the logs page's next-page control. Flip the per-user Hide LiteAdmin switch during global setup so every spec reusing the admin storage state loads with the button hidden.
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