litellm/tests/unit/integrations/lens
Kerry Lu 7233272834
feat(lens): show the Lens UI served by the connected Lens in the dashboard (#53473)
* feat(lens): show the Lens UI served by the connected Lens in the dashboard

The dashboard no longer compiles a pinned copy of @litellm/lens-ui. The Lens page
frames the workspace the connected Lens serves, fetched through /lens/ui on the
gateway, so the UI follows the Lens version and not the gateway version

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(lens): name the session the dashboard hands the frame

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(lens): name the workspace path check

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(lens): charge workspace assets to the shared forward buffer budget

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(lens): forward the connected Lens UI and its page APIs, signed in with the dashboard login

The Lens page frames the UI the connected Lens serves at /lens/ui/ and the gateway forwards the page APIs under /lens/ to that Lens unchanged. Requests are signed in with the dashboard login on every request, or a key for the CLI and MCP clients. Page forwarding lives in pages.py, apart from the identity hand-off in adapter.py and from ingest. A Lens too old to be mounted gets an update notice

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style(lens): format the Lens page files

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(lens): hold the dashboard cookie login to the gateway's route rules on the Lens page routes

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(lens): stop non admins at the gateway on the Lens admin page APIs

Requests under /lens/admin/ reach Lens only for a proxy admin or admin viewer, with no route list here. Lens decides which page APIs sit under that prefix and still refuses a viewer's writes

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(lens): assert the admin page check result

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(lens): mark forwarded Lens page API responses private and uncacheable

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(lens): compare the scheme too when checking a Lens change came from the dashboard

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(lens): keep the content policy Lens sends for its UI when adding the dashboard framing rule

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-21 19:55:54 -08:00
..
fixtures feat(lens): send the calling agent's framework, task and session on gateway traces (#53186) 2026-11-20 21:31:02 +00:00
proxy feat(lens): show the Lens UI served by the connected Lens in the dashboard (#53473) 2026-11-21 19:55:54 -08:00
__init__.py
test_config.py
test_exporter.py fix(lens): send cost records to Lens without the conversation (#53274) 2026-11-20 18:23:36 -08:00
test_otlp_http.py
test_queries.py
test_receiver.py
test_remote.py
test_storage.py