mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix: mypy + UI page-metadata sync for memory page
Two CI failures:
1. mypy: `_find_memory_for_caller` had `key_filter` inferred as
`dict[str, str]` (literal type) and the conditional `{"AND": [key_filter, vis]}`
returned `dict[str, list[...]]`, so the join site failed
`dict-item` typing. Annotate both intermediates as `dict` so mypy
widens the value type.
2. UI test (`page_utils.test.ts > should have descriptions for all
pages`): every leftnav entry must have a description in
`page_metadata.ts`, and `memory` was missing. Added a one-line
description, matching the style of neighboring entries.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
765804aa69
commit
5a69f75bd8
2 changed files with 3 additions and 2 deletions
|
|
@ -367,9 +367,9 @@ async def _find_memory_for_caller(
|
|||
prisma_client: Any, key: str, user_api_key_dict: UserAPIKeyAuth
|
||||
) -> Any:
|
||||
"""Look up a memory row by key, scoped to the caller's visibility."""
|
||||
key_filter = {"key": key}
|
||||
key_filter: dict = {"key": key}
|
||||
vis = _visibility_filter(user_api_key_dict)
|
||||
where = key_filter if vis is None else {"AND": [key_filter, vis]}
|
||||
where: dict = key_filter if vis is None else {"AND": [key_filter, vis]}
|
||||
rows = await prisma_client.db.litellm_memorytable.find_many(
|
||||
where=where, take=1, order={"updated_at": "desc"}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export const pageDescriptions: Record<string, string> = {
|
|||
models: "Configure and manage LLM models and endpoints",
|
||||
agents: "Create and manage AI agents",
|
||||
"mcp-servers": "Configure Model Context Protocol servers",
|
||||
memory: "Inspect and manage agent memory entries stored under /v1/memory",
|
||||
guardrails: "Set up content moderation and safety guardrails",
|
||||
policies: "Define access control and usage policies",
|
||||
"search-tools": "Configure RAG search and retrieval tools",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue