Summary
The livekit-plugins-anam avatar plugin mints an Anam session with no way to request the avatar's output video dimensions. Anam's public session-token API now accepts explicit pixel output dimensions (sessionOptions.videoWidth / videoHeight), so the plugin should expose and forward them.
Motivation
Anam resolves the avatar's output frame size at session-token creation. Today the plugin always gets the avatar model's default size — an Agents developer can't request a specific output (e.g. Cara 4 landscape 1152x768, or portrait once Anam enables it server-side). Other provider plugins already expose this; e.g. livekit-plugins-avatario has a VideoInfo(video_width, video_height) dataclass.
Proposal
Add an optional anam.SessionOptions(video_width, video_height) (pixels only, both-or-neither) that the plugin forwards into the Anam session-token request as sessionOptions.videoWidth/videoHeight:
session = anam.AvatarSession(
persona_config=anam.PersonaConfig(name="avatar", avatarId=ANAM_AVATAR_ID),
session_options=anam.SessionOptions(video_width=1152, video_height=768),
)
- Pixels only — no portrait/landscape strings.
- Backward compatible: optional; omitted -> identical request to today -> Anam applies the model default.
- Validation stays server-side in Anam (single source of truth): an unsupported pair returns HTTP 400, already surfaced by the plugin as
APIStatusError. New output sizes (e.g. portrait) can therefore be enabled by Anam server-side with no plugin release.
Scope
Small, additive change to the anam plugin only (types.py, avatar.py, api.py, __init__.py) plus the example. Mirrors the existing Avatario precedent. No new dependencies; no change to the LiveKit token / engine-session / remote-track flow.
Open question for maintainers
Naming: top-level SessionOptions (matches Anam's own sessionOptions API field and leaves room for future session options) vs a nested AvatarSession.VideoInfo (matches Avatario). Happy to match house preference.
Summary
The
livekit-plugins-anamavatar plugin mints an Anam session with no way to request the avatar's output video dimensions. Anam's public session-token API now accepts explicit pixel output dimensions (sessionOptions.videoWidth/videoHeight), so the plugin should expose and forward them.Motivation
Anam resolves the avatar's output frame size at session-token creation. Today the plugin always gets the avatar model's default size — an Agents developer can't request a specific output (e.g. Cara 4 landscape
1152x768, or portrait once Anam enables it server-side). Other provider plugins already expose this; e.g.livekit-plugins-avatariohas aVideoInfo(video_width, video_height)dataclass.Proposal
Add an optional
anam.SessionOptions(video_width, video_height)(pixels only, both-or-neither) that the plugin forwards into the Anam session-token request assessionOptions.videoWidth/videoHeight:APIStatusError. New output sizes (e.g. portrait) can therefore be enabled by Anam server-side with no plugin release.Scope
Small, additive change to the anam plugin only (
types.py,avatar.py,api.py,__init__.py) plus the example. Mirrors the existing Avatario precedent. No new dependencies; no change to the LiveKit token / engine-session / remote-track flow.Open question for maintainers
Naming: top-level
SessionOptions(matches Anam's ownsessionOptionsAPI field and leaves room for future session options) vs a nestedAvatarSession.VideoInfo(matches Avatario). Happy to match house preference.