Skip to content

Comments

Update Simli integation endpoint#4894

Merged
davidzhao merged 3 commits intolivekit:mainfrom
simliai:main
Feb 20, 2026
Merged

Update Simli integation endpoint#4894
davidzhao merged 3 commits intolivekit:mainfrom
simliai:main

Conversation

@Antonyesk601
Copy link
Contributor

The livekit agents integration endpoint has changed and the old endpoint will be deprecated.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment on lines +140 to +142
except Exception:
logger.error(
f"failed to connect to simli avatar session server returned {avatarConnectionRequest.status} and detail {body}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 UnboundLocalError in second except block when HTTP POST itself fails

Same issue as the first except block: if the post() call on line 130 raises an exception, avatarConnectionRequest is never assigned. The except handler on line 141-142 references avatarConnectionRequest.status, which will raise UnboundLocalError. Similarly, if line 130 succeeds but line 138 (body = await avatarConnectionRequest.text()) fails, body still holds the value from the first try block, which would be misleading.

Root Cause

The try block:

avatarConnectionRequest = await self._ensure_http_session().post(...)  # line 130
body = await avatarConnectionRequest.text()  # line 138
avatarConnectionRequest.raise_for_status()  # line 139

If line 130 raises, avatarConnectionRequest is undefined. The except handler:

f"...server returned {avatarConnectionRequest.status} and detail {body}"

will crash with UnboundLocalError.

Impact: Network-level failures on the second request will cause an UnboundLocalError instead of a meaningful error log.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@davidzhao davidzhao merged commit a78a6f9 into livekit:main Feb 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants