mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
`mcp_server_edit` builds its update payload from `validateFields()`, so the request body is whatever antd had mounted at the moment Save was pressed. Nothing asserted that body, and the existing suite has no `toStrictEqual` anywhere, so a key appearing, disappearing, or arriving as null instead of undefined was invisible. This adds a characterization net that drives the real component tree and captures the exact object handed to `updateMCPServer`. Every case is pinned with `toStrictEqual`, which is the only matcher that separates the three states a key can be in: absent, present-as-undefined, and present-with-value. That distinction is the whole point here, since a gated-off field and a mounted-but-empty field currently differ, and `entra_obo` versus plain `token_exchange` is exactly that difference in the wild. 19 cases cover the transports, all ten auth types, the credential subsets each one contributes, and the tool allowlist gate. Values were captured from the component as it behaves today rather than written from reading the source, so the file records current behaviour instead of intended behaviour A six-mutant battery run against the payload builder kills 6/6, each run executing all 19 tests: leaking an audit field, deleting a binding, removing a gate, turning a flat key into a lodash path, swapping undefined for null, and swapping an empty-array default for null Two explicit assignments in the payload turn out to be dead. `alias` and `mcp_access_groups` are both already supplied by the `...restValues` spread above them, so removing either line changes nothing. Left in place here and noted for the payload extraction that follows |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||