Skip to content

feat: voice.plan builtin and SetVoicePlanCommand for GPT-Live - #40

Merged
MatthewHsu1 merged 2 commits into
mainfrom
feat/voice-plan
Oct 8, 2026
Merged

MatthewHsu1 merged 2 commits into
mainfrom
feat/voice-plan

Conversation

@MatthewHsu1

@MatthewHsu1 MatthewHsu1 commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Change

  • Voice plan. SetVoicePlanCommand sets the plan a GPT-Live voice runs between the backend's answers: the next step, what to ask, and when to delegate again. A new plan replaces the last one. The limit is 1,000 characters.
  • voice.plan builtin. Opt-in. Declare it as { id: plan, kind: builtin, uses: voice.plan }. The model calls it to send a plan through the turn's channel. On a channel with no separate voice, it returns a tool error.
  • GPT-Live channel. LiveChannel sends each plan as silent context, numbered: "Plan N. This replaces every earlier plan." GPT-Live cannot delete an append, so the number is what makes a newer plan win. Context and plans now go out one at a time, in the order they were sent.
  • Builtins: a missing required text input. When the model leaves out a required string, the builtin now gets null and returns its own tool error. Before, the call threw.

Public API

Additive only:

  • SetVoicePlanCommand (with MaxLength = 1000).
  • BuiltinToolNames.VoicePlan = "voice.plan".

Tests

  • SetVoicePlanCommandTests and VoicePlanToolDefinitionTests cover the command and the builtin.
  • OpenAiLiveVoicePlanTests covers numbering and send order on the GPT-Live channel.
  • FilePublishToolDefinitionTests covers the missing-input tool error.
  • Local run: build 0 warnings, all tests pass. The first CI run found a race in the new send-order test; the test now waits for the third plan. Postgres, Qdrant, and S3 tests were skipped locally.

- Add SetVoicePlanCommand: the plan a GPT-Live voice runs between the backend's answers.
  Each plan replaces the one before it. Limit is 1,000 characters.
- Add the opt-in voice.plan builtin. It sends the plan through the turn's channel.
  On a channel with no separate voice, it answers with a tool error.
- LiveChannel numbers each plan ("Plan N. This replaces every earlier plan.") and
  sends context and plans one at a time, in order.
- Builtins bind a required text input the model left out as null, so the tool answers
  with its own tool error instead of a throw.
The test waited for the greeting, which does not wait for the plan line. Plan 3 could still be in line when the test read the sent list.
@MatthewHsu1
MatthewHsu1 merged commit d30829c into main Oct 8, 2026
1 check passed
@MatthewHsu1
MatthewHsu1 deleted the feat/voice-plan branch October 8, 2026 07:26
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