Skip to content

feat: live observability, ElevenLabs migration sync, and provider bridges - #118

Open
aadhar-EAI wants to merge 6 commits into
mainfrom
border
Open

feat: live observability, ElevenLabs migration sync, and provider bridges#118
aadhar-EAI wants to merge 6 commits into
mainfrom
border

Conversation

@aadhar-EAI

Copy link
Copy Markdown
Collaborator

Summary

  • Add live call observability: live event ingest, trace/recording archive, Observability UI (call list, detail, waveform, trace tree), and provider trace normalization for ElevenLabs, Retell, and Vapi
  • Add ElevenLabs migration path: provider sync jobs (agent import, 30-day conversation catalog/enrich), monitor WebSocket bridge for live transcripts, proxied audio playback, and Pipecat observer script for local bots
  • Fix GPT-5 reasoning models rejecting non-default temperature during LLM generation (e.g. scenario generation)

Test plan

  • Run pending migration 061_provider_sync_jobs and verify backend health
  • Start local stack, confirm Observability UI loads calls and call detail (transcript, traces, audio)
  • Configure ElevenLabs webhook via ngrok (docs/telemetry/elevenlabs-local-ngrok.md) and verify post-call ingest
  • Trigger POST /integrations/{id}/sync/elevenlabs/agents and .../conversations; confirm job progress endpoints
  • Generate scenarios with gpt-5.6 and confirm no temperature 400 error
  • Run targeted tests: pytest tests/test_api/test_observability_routes.py tests/test_api/test_integrations_routes.py tests/test_services/test_ai/test_llm_service.py

Made with Cursor

Aadhar Singh Bhadauria and others added 5 commits August 18, 2026 10:52
Land incremental live-event ingest, provider/synthetic traces, and Observability UI so the traces work can keep building from a committed baseline.

Co-authored-by: Cursor <cursoragent@cursor.com>
…5 temperature fix

Add provider sync jobs for bulk ElevenLabs agent/conversation import, live transcript bridges (monitor WebSocket + Pipecat observer), proxied ElevenLabs audio playback, and omit unsupported temperature for GPT-5 reasoning models.

Co-authored-by: Cursor <cursoragent@cursor.com>
Integrate usage tracking, metric studio, and platform admin from main with
ElevenLabs observability, provider sync, and live tracing from border.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore missing provider schemas, remove duplicate voice_bundle argument,
track ElevenLabs test fixtures, and seed org/workspace in live emitter test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Only build live synthetic traces for pipecat/livekit or explicit live_transcript,
use 6-char call_short_id values in observability API tests, add S3 download stub,
and make call ingest tests self-contained.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TEJASNARAYANS

TEJASNARAYANS commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@greptile-apps

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds live observability, provider synchronization and bridges, provider trace/audio normalization, and supporting frontend workflows. It also updates LLM generation behavior for reasoning models.

  • Adds call ingest, live traces, recording archival, provider normalization, and an Observability UI.
  • Adds ElevenLabs agent and conversation synchronization with background-job progress and cancellation.
  • Adds provider audio proxying, migration helpers, and local observability tooling.
  • Adjusts reasoning-model generation settings and expands focused backend/frontend tests.

Confidence Score: 2/5

The PR is not safe to merge until provider-sync cancellation is made race-safe and authenticated recording downloads bind requests to validated destinations.

Catalog and agent workers can overwrite a concurrently committed cancellation, while the recording downloader can attach an ElevenLabs credential after an independent connection-time DNS resolution that was not the address previously validated.

Files Needing Attention: app/workers/tasks/elevenlabs_provider_sync.py, app/services/observability/recording_url_safety.py, app/services/telephony/recording_download.py

Security Review

The authenticated ElevenLabs recording downloader still separates DNS validation from connection-time resolution, leaving a DNS-rebinding path that can send the provider credential to an internal destination. How this was verified: The validator checks one getaddrinfo result, while HTTPX subsequently resolves and connects independently with the xi-api-key attached.

Important Files Changed

Filename Overview
app/workers/tasks/elevenlabs_provider_sync.py Adds the provider-sync workflow and cancellation polling, but catalog and agent terminal writes can still overwrite a concurrent cancellation.
app/services/observability/recording_url_safety.py Adds host, path, IP, and redirect checks for credential-bearing downloads, but leaves validation vulnerable to DNS rebinding.
docker-compose.yml Adds provider-sync to the import worker's consumed queues, resolving the previously unconsumed queue.
app/api/v1/routes/integrations.py Adds provider-sync creation, status, and cancellation endpoints; cancellation commits correctly but workers do not preserve it atomically.
app/api/v1/routes/observability.py Substantially expands observability ingest, retrieval, live event, trace, and recording endpoints.

Reviews (3): Last reviewed commit: "Address Greptile merge blockers for prov..." | Re-trigger Greptile

Comment thread app/workers/tasks/elevenlabs_provider_sync.py Outdated
Comment thread app/workers/tasks/elevenlabs_provider_sync.py
Comment thread app/services/observability/provider_audio_proxy.py Outdated
Route provider-sync tasks in Docker Compose, terminate agent sync jobs on
completion, honor cancellation during sync loops, and validate ElevenLabs
recording URLs before attaching provider credentials.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TEJASNARAYANS

Copy link
Copy Markdown
Contributor

@greptile-apps

1 similar comment
@aadhar-EAI

Copy link
Copy Markdown
Collaborator Author

@greptile-apps

if not payload.get("has_more") or not cursor:
break

_mark_job(db, job, status="running", phase="enrich")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Cancellation state is restored to running

When a user cancels after the catalog task’s final cancellation check but before its phase handoff, this unconditional write replaces cancelled with running, causing the chained enrichment task to continue provider requests and database writes while subsequent syncs remain blocked. The standalone agent task has the same terminal-write race and can replace cancellation with completed.

Comment on lines +65 to +70
with httpx.Client(
timeout=timeout_seconds,
follow_redirects=True,
event_hooks={"request": [_validate_redirect]},
) as client:
response = client.get(recording_url, headers={"xi-api-key": api_key})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security DNS rebinding bypasses destination validation

When an allowed ElevenLabs hostname changes from a public address during validation to a private address when HTTPX connects, the request sends the decrypted xi-api-key to the unvalidated internal destination, enabling internal-network access and credential disclosure.

How this was verified: The validator checks one getaddrinfo result, while HTTPX subsequently resolves and connects independently with the xi-api-key attached.

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