Skip to content
Source
Sign inSign up
TanStack/ai

feat(ai-openai): stream transcription text as it arrives #2179

Mergedrodriciru(GitHub profile, opens in a new tab)merged 10 commits intomain fromrefs/pull/2179/headmerged by tombeckenham View on GitHub

Showing 25 changed files with 12 additions and 1 deletion (loading 22).

x
0 of 25 viewed, 25 left
6 additions and 0 deletions.changeset/quiet-taxis-stream.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+'@tanstack/ai': minor
+'@tanstack/ai-openai': minor
+---
+​
+Add incremental transcription streaming for OpenAI models that support it.
5 additions and 0 deletions.changeset/transcription-stream-final-text.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/ai': patch
+---
+​
+Emit a final text delta for streamed transcriptions when the adapter does not provide `transcribeStream`. Report startup cancellation through middleware `onAbort`.
1 addition and 1 deletiondocs/media/generation-hooks.mdModified
View file
@@ -504,7 +504,7 @@
| --- | --- | --- |
| `byok` | `ByokClient` | A keyring. Keys go in `x-byok-*` headers, never in the body. |
| `byokProvider` | `() => ProviderId \| undefined` | The provider slug. If it returns a slug, only that key is sent. Otherwise the hook uses `body.provider`. If no slug resolves, `generate` throws. |
-| `onChunk` | `(chunk: StreamChunk) => void` | Called for each stream event. Only with `connection`. |
+| `onChunk` | `(chunk: StreamChunk) => void` | Called for each stream event from a `connection` or a `fetcher` that returns an SSE `Response`. |
| `hydrateGeneration` | handler | Restores the last run when the `connection` has no restore handler, for example next to a `fetcher` |
| `joinRun` | handler | Re-attaches to a run that is still going after a reload. Without it, a restored running run shows as an error. |
| `devtools` | `AIDevtoolsDisplayOptions` | How the run shows in TanStack AI Devtools |
docs/media/transcription-advanced.mdModified
View file
Loading the diff