feat(plugins-tavus): rename replica/persona to face/pal#6239
Open
carolin-tavus wants to merge 9 commits into
Open
feat(plugins-tavus): rename replica/persona to face/pal#6239carolin-tavus wants to merge 9 commits into
carolin-tavus wants to merge 9 commits into
Conversation
Tavus is renaming its public API surface from replica_id/persona_id to face_id/pal_id. Rename the plugin's public params (face_id/pal_id) and env vars (TAVUS_FACE_ID/TAVUS_PAL_ID); the old replica_id/persona_id args and TAVUS_REPLICA_ID/TAVUS_PERSONA_ID env vars still work as deprecated aliases. The Tavus wire payload keys are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Mocked pytest unit tests (no live API): face_id/pal_id map onto the unchanged wire keys, deprecated replica_id/persona_id args and TAVUS_REPLICA_ID/ TAVUS_PERSONA_ID env vars still work and warn, env-var fallback, the TAVUS_FACE_ID-required error, and AvatarSession alias resolution. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Tavus API now accepts face_id/pal_id on /v2/conversations and exposes /v2/pals (pal_name + default_face_id). Send the new keys, add create_pal() hitting /v2/pals, and auto-create a pal (not a persona) when none is given. create_persona() stays as a deprecated alias on the legacy /v2/personas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A pal carries its own default_face_id, so a conversation can be created from pal_id alone. Require face_id only when no pal_id is given (to create one); otherwise send pal_id and let the pal's default face apply. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Instead of erroring when neither a face nor a pal is given, fall back to a default stock face to create the pal, so the zero-config path works. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…y used Previously the deprecation warning fired whenever a deprecated arg was present, even if the new arg was also given and took precedence. Warn only when the deprecated value is the one used. (addresses review feedback) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…er conversation When no pal is supplied, reference a published stock pal (echo + livekit) instead of POSTing a new pal to /v2/pals on every conversation, which avoided accumulating throwaway pals. create_pal() stays for creating your own. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Align the Tavus plugin with Tavus's renamed API (
replica→face,persona→pal). Public params, env vars, and the wire payload move to the new naming; the old names stay working as deprecated aliases (non-breaking for plugin users).face_id/pal_idparams (andTAVUS_FACE_ID/TAVUS_PAL_IDenv vars) toAvatarSessionandTavusAPI.create_conversation.face_id/pal_idon the conversation-create payload; addcreate_pal()hittingPOST /v2/pals(pal_name+default_face_id), and auto-create a pal (not a persona) when none is supplied.replica_id/persona_idparams,TAVUS_REPLICA_ID/TAVUS_PERSONA_IDenv vars, andcreate_persona()(legacy/v2/personas) working as deprecated aliases with aDeprecationWarning.avatar_agents/tavusexample to the new names.Test plan
ruff check(E,W,F,I,B,C4,UP) andruff format --checkpass._postmocked): new keys map onto theface_id/pal_idwire payload, deprecated args/env still work and warn, auto-create routes to/v2/palswithdefault_face_id, theTAVUS_FACE_ID-required error, andAvatarSessionalias resolution./v2/pals→ conversation withface_id/pal_id) on both the new-arg and deprecated-arg paths.Notes
The face/pal wire support is live on Tavus prod (
tavusapi.com); both old and new keys are accepted, so this is non-breaking for existing integrations.