Skip to content

docs(rest)+test(core): true live_transcribe call shape; drop stale ai_sidecar bypass - #85

Closed
grandcamel wants to merge 1 commit into
signalwire:mainfrom
grandcamel:docs/rest-transcribe-and-sidecar-test
Closed

docs(rest)+test(core): true live_transcribe call shape; drop stale ai_sidecar bypass#85
grandcamel wants to merge 1 commit into
signalwire:mainfrom
grandcamel:docs/rest-transcribe-and-sidecar-test

Conversation

@grandcamel

Copy link
Copy Markdown
Contributor

Summary

Two small truth-corrections, no behavior changes.

rest/docs/calling.md — live transcribe/translate call shape

The doc showed

client.calling.live_transcribe(call_id, action="start", lang="en")
client.calling.live_translate(call_id, action="start", from_lang="en", to_lang="es")

but the generated signatures take action as a keyword-only union of TypedDicts (LiveTranscribeStartAction is {"start": {...}}), and neither method has a lang/from_lang/to_lang parameter — copying the documented call raises TypeError: unexpected keyword argument. The start parameters live inside the action object (lang, webhook, … for transcribe; from_lang, to_lang, … for translate, matching the schema's TranscribeStartAction/StartAction defs). Updated the examples to the real shape, including the action="stop" literal form.

tests/unit/core/test_swml_service_swaig.py — stale ai_sidecar bypass

The sidecar-pattern test appended the ai_sidecar verb to _current_document by hand, with a comment saying the verb wasn't in the live SWML schema yet and that callers would use add_verb_to_section "once the schema lands". The schema landed (4645d48): add_verb_to_section("main", "ai_sidecar", {...}) now validates and returns True. The test now exercises that supported path — which is also stronger, since the verb goes through schema validation instead of around it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MgA3KeCEPMKMJVvroZY1wV

…_sidecar bypass

calling.md showed live_transcribe(call_id, action="start", lang="en"),
but the generated signature takes action as a keyword-only TypedDict
union ({"start": {...}} or the literal "stop") and has no lang/from_lang
/to_lang parameters — copying the documented call raises TypeError. The
examples now show the real shape, with the start parameters inside the
action object where the schema defines them.

The sidecar pattern test appended ai_sidecar to the raw document with a
comment that the verb was not in the live SWML schema yet. It landed in
4645d48, so the test now uses add_verb_to_section directly — the path
the comment promised, and stronger, since the verb goes through schema
validation instead of around it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MgA3KeCEPMKMJVvroZY1wV
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.

1 participant