pipecat-ai / pipecat
Code health
This codebase scores 7.3 out of 10 for code health, which we rate good. It also scores maintainability 8.0 and static performance 9.9 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 340 of 1,792 files are git hotspots, and they average 6.1 — which is where the fixes pay off most.
Do next
4 suggested
4 things worth doing in the week to Oct 19, the last indexed commit, 1 of them now.
Now
- High
Clean up what this week's commits left: 4 serious findings in 4 files
3 commits in the last 7 days added or worsened them, and they are still open. Start with
src/pipecat/evals/judge.py.- serious findings
- 4
- critical
- 0
- files
- 4
Medium effort
Worth planning
Start breaking up _process_context (CCN 46, 163 lines): first lift lines 906-939
src/pipecat/services/google/llm.py:906
_process_context nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 26 commits; its file is imported by 42 files, changed 32 times in 90 days.
- gain
- up to +1.0 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 46, 163 lines, nests 6 deep
- severity
- high
Medium effort, worth a checkStart breaking up _process_context (CCN 53, 165 lines): first lift lines 510-550
src/pipecat/services/aws/llm.py:510
_process_context is long and branchy; easier to read and change once split, which also removes a duplicate; function changed in 31 commits; its file is imported by 15 files, changed 19 times in 90 days.
- gain
- up to +0.8 health on this file(inferred)
- finding
- Brain method
- size
- CCN 53, 165 lines, nests 4 deep
- severity
- critical
Medium effort, worth a checkStart breaking up ask_project_questions (CCN 65, 412 lines): first lift lines 484-637
src/pipecat/cli/prompts/questions.py:484
ask_project_questions is long and branchy; easier to read and change once split, which also removes a duplicate; function changed in 6 commits; its file is imported by 8 files, changed 1 time in 90 days.
- gain
- up to +1.0 health on this file(inferred)
- finding
- Brain method
- size
- CCN 65, 412 lines, nests 4 deep
- severity
- critical
Medium effort, worth a check
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
- Lines of code
- 335.0K
Recent activity
All commitsCommits
- d5701ae7Update changelog for version 1.13.07h ago
- 02f9cf37Add changelog entry for #623017h ago
- 5dcbe094Fail a scripted send_after wait as soon as the bot ends the call17h ago
- 42edf385Test a reply that skips TTS and holds only whitespace18h ago
- 18b20d32Send right away only the bot output the TTS left out of speech18h ago
- ce8118c1Start every bot output segment that isn't spoken as new18h ago
Decisions
- Remove unsupported vad_events setting from Deepgram SageMaker STT settings builderproposed · 7h ago
- Add private_endpoint support to Azure TTS servicesproposed · 7h ago
- Mark emitted ErrorFrame objects as non-fatal for graceful degradationproposed · 7h ago
- Adopt aic-sdk 0.21 raw VAD probability and new Quail VAD modelsproposed · 7h ago
- Emit ErrorFrame in TTS/STT services for pipeline error detectionproposed · 7h ago
- Remove BotStoppedSpeakingFrame fallback in Nova Sonicproposed · 7h ago
Everything we found
4,267 open
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.
- worst item is critical severity. Code health3,105God class · src/pipecat/transports/moq/transport.py38 findings · 8.0 deducted
- worst item is medium severity. Refactoring229render+2.4 health, M effort · scripts/provider-watch/digest.py
- worst item is medium severity. Doc drift2examples/flows/README.mdLink points at #%EF%B8%8F-developing-pipecat, which ../../README.md no longer declares.
- worst item is medium severity. Decisions390src/pipecat/services/tts_service.py50 awaiting review · 340 hotspots ungoverned
- worst item is medium severity. Ownership537tests/test_evals_session.py85% single-owner concentration, 80 commits in 90d
- worst item is low severity. Dead code4NvidiaSageMakerHTTPTTSServiceUnreachable class (176 lines)
Composition
Open the graph- python94%
- typescript4%
- javascript1%
- shell<1%
- makefile<1%
Explore this codebase
- Docs2,336 pages across 6 modules
- ChatAsk this codebase a question and get an answer with its sources.
- Files1,792 files with per-file docs, health and history
- ArchitectureDependency graph, layers, and 16 entry points
- Code healthPer-file scores, 3,256 open findings, coverage and refactoring targets
- Knowledge graphEntities, communities, and the paths between them
- Change couplingFiles that keep changing together, mined from commit history
- CommitsChange-risk ranked history with agent provenance
- ContributorsBus factor, per-file maintainers, and the human/agent split
- StatsSize class, origin, lifetime churn, rhythm and records
- CostsWhat indexing this snapshot cost, by model and by run.