-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds an opt-in, local-only text-turn testing harness to the StreamCoreAI voice agent server, allowing smoke/regression testing of LLM + plugins/skills (+ optional RAG) without driving the WebRTC audio pipeline.
Changes:
- Introduces
test.turn_endpointconfig and documents it in README +config.toml.example. - Registers
POST /test-turnwhen enabled and implements the request/response handler. - Adds unit tests for the new HTTP handler.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new test.turn_endpoint dev-only flag and endpoint. |
| main.go | Conditionally registers the /test-turn route when enabled. |
| internal/testturn/handler.go | Implements the text-turn HTTP handler, prompt construction, optional RAG injection, and tool/skill wiring. |
| internal/testturn/handler_test.go | Adds basic request/response and error-mapping tests for the handler. |
| internal/config/config.go | Adds [test] section to the config struct (turn_endpoint). |
| config.toml.example | Adds an example [test] configuration block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
monkeyin92
commented
May 13, 2026
Addressed the automated review hardening points in 62ce374:
/test-turnnow reuses the existing JWT middleware whenserver.jwt_secretis configured.- Runner/provider failures are logged server-side but return a generic client error.
- Oversized request bodies now return
413 Request Entity Too Large. - The text harness skips
vision.analyze, since that tool depends on the realtime pipeline camera/image injection path. - Added regression coverage for the generic error response, 413 handling, and vision-tool filtering.
Validation: go test ./....
monkeyin92
commented
Jun 1, 2026
One last follow-up from my side: the dev-only /test-turn harness is still open and mergeable, and the current scope is the one I intended for local regression testing. If anything needs adjustment before review or merge, please let me know; otherwise I’ll stop nudging this thread.
Summary
Adds an opt-in local text-turn harness for regression and smoke testing without driving the live WebRTC audio path.
When
test.turn_endpoint = true, the server registersPOST /test-turnand accepts a single text turn (textorcustomerText) plus optional prior messages. The handler reuses the configured LLM, plugins, skills, and optional RAG context, then returns a Voice TestOps-compatible JSON response withspoken, streamed response events, and latency.Why
This gives local test tools a deterministic way to exercise assistant behavior without exposing or testing against a shared live demo agent. The endpoint is disabled by default and documented as dev-only.
Validation
go test ./...