Skip to content

Fce 3025 add vapi agent#71

Merged
roznawsk merged 5 commits intomainfrom
FCE-3025-add-vapi-agent
Apr 8, 2026
Merged

Fce 3025 add vapi agent#71
roznawsk merged 5 commits intomainfrom
FCE-3025-add-vapi-agent

Conversation

@roznawsk
Copy link
Copy Markdown
Member

@roznawsk roznawsk commented Apr 8, 2026

Description

Describe your changes.

Motivation and Context

Why is this change required? What problem does it solve? If it fixes an open
issue, please link to the issue here.

Documentation impact

  • Documentation update required
  • Documentation updated in another PR
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

@roznawsk roznawsk requested a review from Copilot April 8, 2026 12:16
@linear
Copy link
Copy Markdown

linear bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SDK to support creating VAPI peers (“VAPI agents”) and refreshes generated OpenAPI/proto bindings to match newer Fishjam API surface (including track forwarding and livestream response wrappers).

Changes:

  • Add PeerType.VAPI, PeerOptionsVapi, and a FishjamClient.create_vapi_agent() helper, plus tests.
  • Regenerate/update OpenAPI client models/endpoints (new *DetailsResponse wrappers, track forwarding models/endpoints, new room fields, etc.).
  • Simplify local test script wiring (uv run pytest) and adjust dependency groups/scripts.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
uv.lock Adds google-genai to the test dependency group lock.
pyproject.toml Renames test scripts and adds google-genai to test deps.
scripts.py Simplifies run_tests() to run pytest directly via uv.
tests/test_room_api.py Adds integration tests for creating/deleting a VAPI peer.
fishjam/api/_fishjam_client.py Adds create_vapi_agent() API method.
fishjam/init.py Exports PeerOptionsVapi at package level.
fishjam/_openapi_client/models/peer_type.py Adds PeerType.VAPI.
fishjam/_openapi_client/models/peer_options_vapi.py Introduces VAPI peer options model.
fishjam/_openapi_client/models/peer_config.py Expands peer options union to include VAPI.
fishjam/_openapi_client/api/room/add_peer.py Adds 402 error parsing.
fishjam/_openapi_client/api/room/create_room.py Adds 402 error parsing.
fishjam/events/_protos/fishjam/init.py Updates generated proto enums/messages (VAPI peer type, VAD + track forwarding notifications).
fishjam/_openapi_client/** (multiple) Regenerates models/endpoints for viewers/streamers/streams and adds track forwarding & composition info support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roznawsk roznawsk marked this pull request as ready for review April 8, 2026 12:45
Comment on lines +220 to +241
def create_vapi_agent(
self,
room_id: str,
options: PeerOptionsVapi,
) -> Peer:
"""Creates a vapi agent in the room.

Args:
room_id: The ID of the room where the vapi agent will be created.
options: Configuration options for the vapi peer.

Returns:
- Peer: The created peer object.
"""
body = PeerConfig(type_=PeerType.VAPI, options=options)

resp = cast(
PeerDetailsResponse,
self._request(room_add_peer, room_id=room_id, body=body),
)

return resp.data.peer
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

suggestion: maybe we should instead just have create_peer handle both webrtc and vapi peers?
The main reason create_agent exists is to simplify the create -> run flow for an agent, but for vapi this is unnecessary.
It would suffice to just discriminate PeerOptions on type or kind

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's a matter of taste for sure, one thing against this approach, is that create_peer returns token, which is useless in the context of vapi.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Valid, let's keep it like this for now then

@roznawsk roznawsk merged commit 9f66732 into main Apr 8, 2026
7 checks passed
@roznawsk roznawsk deleted the FCE-3025-add-vapi-agent branch April 8, 2026 15:12
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.

3 participants