mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix(vm_providers): registry adapter threads session_id into terminate metadata for tests
This commit is contained in:
parent
29146f012b
commit
d955639aa9
1 changed files with 5 additions and 3 deletions
|
|
@ -79,9 +79,11 @@ class _ProviderAdapter:
|
|||
return
|
||||
from litellm.proxy.agent_session_endpoints.vm_providers.base import VMHandle
|
||||
|
||||
handle = VMHandle(
|
||||
vm_id=vm_id, provider=self.name, metadata=dict(metadata or {})
|
||||
)
|
||||
# Carry session_id in metadata so test/recording noops can correlate
|
||||
# the terminate call to the originating session without changing the
|
||||
# ABC's terminate(handle) signature.
|
||||
handle_metadata = {**(metadata or {}), "session_id": session_id}
|
||||
handle = VMHandle(vm_id=vm_id, provider=self.name, metadata=handle_metadata)
|
||||
try:
|
||||
await self._inner.terminate(handle)
|
||||
except TypeError:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue