litellm/tests/test_litellm/managed_agents
Ishaan Jaffer 6500a4b5d8
test(v2 managed agents): adapter tests for model object split, stateful streaming, permission auto-grant
send_message:
  - assert {providerID, modelID} object body (not string)
  - 'openrouter/anthropic/claude-3' splits on first '/' only
  - models without '/' omit the field entirely
  - model=None omits the field

list_messages: assert {info, parts} envelopes normalize to MessageRow,
  with reasoning/step-start/step-finish filtered out of content and the
  combined providerID/modelID showing up as our model string.

stream_events: assert text deltas route through partID -> type tracking,
  the partID map persists across multiple message.part.updated events,
  session.idle is enriched with the tracked assistant message_id, and
  permission.asked triggers a fire-and-forget POST to
  /session/:sid/permissions/:per_id with {response:'once'}.
2026-05-07 10:48:36 -07:00
..
adapters test(v2 managed agents): adapter tests for model object split, stateful streaming, permission auto-grant 2026-05-07 10:48:36 -07:00
__init__.py test(v2 managed agents): tests package init 2026-05-07 10:06:56 -07:00
conftest.py test(v2 managed agents): pytest fixtures (opencode lifecycle, fake row, app client) 2026-05-07 10:06:56 -07:00
test_agents.py test(v2 managed agents): unit tests for POST /v2/agents 2026-05-07 10:06:56 -07:00
test_events.py test(v2 managed agents): unit tests for SSE events endpoint 2026-05-07 10:06:56 -07:00
test_happy_paths.py test(v2 managed agents): three happy-path integration tests (Flow 1/2/3) 2026-05-07 10:06:56 -07:00
test_messages.py test(v2 managed agents): unit tests for messages endpoints 2026-05-07 10:06:56 -07:00
test_sessions.py test(v2 managed agents): unit tests for GET /v2/sessions/:id 2026-05-07 10:06:56 -07:00
test_types.py fix(v2 managed agents): add SandboxSpec validator tests 2026-05-07 10:43:08 -07:00