You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LLM services resolve the file URLs their provider cannot fetch. Every
LLM service holds a files.Resolver (llm.WithFileResolver, defaulting
to one for data: and http(s) URLs) and hands it to its adapter. An
adapter whose provider takes files calls adapter.Base.PrepareFileContent
before converting: a URL the provider reads itself (and, for http(s), is
publicly routable) passes through, and any other is fetched into the
resolver's caches, where InlinedFileContent and DecodedFileBytes read
it during conversion.
Files reach every provider that takes them. Each adapter says which
file URLs its provider reads itself (SupportsFileURL) and inlines the
rest: OpenAI chat completions reads image URLs and takes images and PDFs
inline; the Responses API reads any http(s) URL and takes any file
inline; Anthropic reads image and PDF URLs and takes them inline as image
and document blocks; Gemini, Gemini Live and Interactions read Files API
URIs, and on Vertex AI (gemini.Adapter.Vertex, interactions.Adapter.Vertex) gs:// URIs too; Bedrock reads s3://
URIs. A file of a type the provider does not take fails the conversion
rather than being dropped.
Breaking: adapter.LLMAdapter.LLMInvocationParams takes a context.Context, since converting a conversation may fetch the files it
references.
files: file storage and resolution for file URLs in an LLM context. files.Resolver fetches and caches the bytes behind a file URL a provider
cannot fetch itself: it decodes data: URLs, fetches http(s) URLs only
when their host is publicly routable or in the allowed networks
(ResolverConfig.AllowedURLNetworks, defaulting to JARGO_ALLOWED_FILE_URL_NETWORKS), refuses redirects and files over the
size limit, and loads other schemes from a files.Storage. files.LocalStorage keeps uploads on disk as jargo:<id> URLs and
trims the oldest beyond its limit.
The deprecated llm.WithAsyncToolCancellation option is back. It lets
the model cancel every asynchronous tool, not only the ones registered
with WithCancellableByLLM(true), and warns at construction.
The deprecated settings.LLM.FilterIncompleteUserTurns and UserTurnCompletionConfig are back. An update that sets the flag
attaches the turn-completion extension and one that clears it detaches it;
an update carrying the configuration reconfigures the attached extension;
each warns. Given at construction they only warn. Realtime services hold
the flag false, and Rime realtime refuses it.
LLM extensions filter and run function calls.llm.Extension has FilterFunctionCalls, through which the service passes the calls it is
about to run, the extension "closest" to the service first; a dropped call
is not run. BaseExtension.RunFunctionCalls has the service run calls of
the extension's own, through the filters of the extensions "farther" out. BaseExtension lets every call through by default, so an extension
embedding it needs no change.
LLM extensions have the service act.BaseExtension.QueueFrame queues
a frame for the service to process as if it came from the pipeline,
through every extension's ProcessFrame. BaseExtension.CancelInferenceInProgress
cancels the service's inference for a context frame if it is the one in
progress; asked from the inference's own output, it is refused and logged.
pipeline/pipelinetest, utilities for testing pipeline components. RunTest runs a processor in a pipeline between two QueuedFrameProcessors, sends it frames once the pipeline has started,
and returns and checks the frames that come out of either end. SleepFrame pauses the frames sent, and HeartbeatsObserver reports a
processor's heartbeats. The frames are sent from the pipeline's loop, so
frames sent together are queued together, and a system frame among them
overtakes the ones queued ahead of it as it does in a running pipeline.
flows.FlowConfigJSONSchema returns the JSON Schema of a flow config
document. flow_config.schema.json is now written from it by go generate ./flows, and a test fails when the shipped file drifts from
the models.
Direct functions:llm.NewDirectFunctionWrapper wraps a function func(ctx, params llm.FunctionCallParams, args Args) error as a tool that
describes itself. The tool is named after the function, its parameters are
the fields of Args (named by their json tags, required unless tagged omitempty or omitzero, described by a description tag), and its Tool carries the function as its handler. llm.BaseDirectFunctionWrapper
is the shared part, for wrappers whose functions take something other than
the call's params.
Flows direct functions:flows.NewDirectFunctionWrapper wraps a
function func(ctx, fm *flows.FlowManager, args Args) (string, *flows.NodeConfig, error) as a tool that describes itself, read as llm.NewDirectFunctionWrapper reads its functions. Its FunctionSchema
goes in a node's Functions, and a Flow's handlers take the wrapper as
it is. flows.ToolOptions sets its call options: not canceled on
interruption and the service's timeout by default.
flows.State gains All, Len, Snapshot, Pop, Update and Clear, so a handler can list what the flow has gathered, take a value out
as it reads it, or store several at once.
Changed
Breaking: RegisterFunction returns an error. Registering the name
of a tool an extension adds (a cancellable tool's cancel tool, for
example) returns llm.ErrReservedToolName and registers nothing, where it
used to log and return nothing, so the caller learns at the call site that
its handler was not installed. Code calling it as a statement still
compiles; a type implementing an interface with RegisterFunction (as pipeline.LLMMember, llmworker.ToolRegistrar and eval.PersonaLLM
declare it) adds the error result. LLMSwitcher.RegisterFunction and Persona.OnEndCall return the error too.
Breaking: predictive delegation decides its race in an LLM extension, llmwithbackend.PredictiveDelegationRaceLLMExtension, the innermost one on
the frontend, so llm.GetExtension finds it and Extensions() lists it. llm.OutputGate and llm.Base.SetOutputGate are removed: an extension's FilterPushFrame and FilterFunctionCalls do what a gate did.
Anthropic leaves prompt caching off unless Config.EnablePromptCaching
turns it on, as the setting's default is off. It used to cache whenever
the field was unset; set it to true to keep that.
Breaking:flows.NodeFunction is renamed flows.FunctionSchema. The
type describes global functions as well as a node's, and the new name is
the one the concept goes by elsewhere.
Breaking:flows.Config takes the pipeline worker as Worker, which is
required, in place of Enqueuer and Watcher; the flows.Enqueuer and flows.Watcher interfaces are replaced by flows.Worker, which *pipeline.Worker satisfies. A manager built without a Watcher used to
hang on its first tts_say or function action. Config.Task is kept as a
deprecated alias of Worker (setting both is an error), and Config.Transport is new. FlowManager.Worker and FlowManager.Transport
give a handler the worker and the transport, and FlowManager.Task is the
deprecated alias of Worker.
Breaking:pipeline.LLMSwitcher.RunInference returns (string, error),
like every LLM service, so a switcher is an llm.Inferencer and can be a
flow's Config.LLM for the reset-with-summary strategy. With no active
service it answers nothing; an active service that cannot answer off the
pipeline is reported as an error wrapping errors.ErrUnsupported, in place
of the former false flag.
Breaking:flows.FlowManager.SetNode is renamed SetNodeFromConfig.
Breaking: the LiveKit transport owns its connection to the room. livekit.NewTransport(cfg, params, opts...) takes the room's Config and
returns (*Transport, error); livekit.Connect and Connection.Close are
gone. The transport joins the room as the pipeline sets up its input and
output, trying three times with a backoff, and leaves it once both have
stopped (on an end, a cancel or at cleanup), raising on_before_disconnect
and on_disconnected then. Config.AudioOutChannels is gone: the published
track follows the transport's AudioOutChannels. Transport.Room gives the
joined room. A room that failed to join partway, or that the bot is leaving
itself, no longer reports a disconnect.
Breaking:transport.OutputDriver gains StopWriting and CancelWriting, which the base output calls on an end or a cancel once its
senders have stopped, and before it pushes the frame on. A transport ends its
outgoing media path there (a hang-up, a disconnect) rather than in ProcessFrame after the frame has gone downstream. transport.BaseOutput
provides no-op defaults, so a transport that embeds it keeps compiling; one
that implements OutputDriver without it adds the two methods.
AssemblyAI transcription runs in AssemblyAI's manual mode by default.
With the pipeline deciding the turns (VADForceTurnEndpoint, the default)
and the default assemblyai-stt-3-7-realtime-agent model, the session opens
with mode=manual: AssemblyAI ends no turns on its own, each VAD stop's
ForceEndpoint ends the turn, and the turn silences are left to the server
(no more 100 ms defaults), so a short pause no longer splits a turn. Set a Mode preset to keep AssemblyAI's turn detection running under the
ForceEndpoint as before. Mode: "manual" can also be set explicitly; it
requires that model and VADForceTurnEndpoint, and does not support SpeakerLabels yet.
Fixed
Settings updates addressed to a service (Service set on an LLMUpdateSettingsFrame, TTSUpdateSettingsFrame or STTUpdateSettingsFrame) are applied by that service. The LLM, TTS and STT
bases compared the target with the base embedded in the provider rather
than the provider itself, so such an update was passed on and never
applied.
Anthropic applies frames.LLMEnablePromptCachingFrame, turning prompt
caching on or off for the next request and stopping the frame there. It
used to let the frame pass and keep its setting.
A function call with no conversation (FunctionCallFromLLM.Context
nil) to a function nothing handles no longer panics while the missing
function is logged: no conversation advertises no tool.
A function call canceled by teardown is settled once its handler
stops, so a result reported afterwards through a kept callback is
rejected, as it is after a timeout or an interruption, instead of
broadcast.
Function calls in flight are kept in the order they started: RunningFunctionCalls lists them, and cancellations settle them, in that
order rather than by tool_call_id, and an interruption cancels them
function by function in the order the functions were registered. Two calls
sharing a tool_call_id are both tracked, so neither escapes a
cancellation.
UnregisterFunction on a name with no handler changes nothing. It
used to record the removal anyway, so a tool advertised at the time and
advertised again later carrying a handler never had that handler
registered.
The LLM extensions see every frame a speech-to-speech service
processes. OpenAI realtime, xAI realtime, Gemini Live, Nova Sonic and
Rime realtime handed the user's audio (and Gemini Live a toolset change,
Rime an image) to the processor base alone, so no extension saw them; the
Anthropic and Bedrock prompt-caching frame skipped the extensions the same
way. The new llm.Base.ProcessServiceFrame does what every LLM service
does with an incoming frame and forwards nothing; a service overriding ProcessFrame calls it first, then handles and forwards the frame itself.
These services now answer a frame before passing it on, and xAI realtime
passes the user's audio on like the others.
A direct function's tool carries its wrapper (DirectFunctionWrapper.Tool
sets Handler to the *DirectFunctionWrapper), so the service registers
it as a direct function: advertised direct functions register before the
tools carrying a handler, one advertised again wrapped afresh is not
rebound, and a name registered by hand keeps its handler without the
redundant-registration warning, which stays for tools carrying a handler. llm.ToolHandler converts any handler a tool carries; the LLM worker and
LLM-with-backend use it.
Breaking: Extension.BuiltinTools receives an llm.FunctionCallRegistry
instead of a map: the registered tools by name (Get) and in the order
they were registered (All). Cancel tools now come in the order the tools
they cancel were registered rather than by name.
Breaking: llm.New panics on a misconfigured extension in the
settings (two of the same type, or an entry that is not an LLM
extension), so the application stops at startup instead of running with
the extension logged and dropped.
The LLM service takes its base prompt from its settings and keeps the
composed instruction there.llm.New reads system_instruction from
the settings as the base prompt, and every composition writes the
instruction in force back into the settings, so a provider reading its
settings (Nova Sonic, Rime realtime, OpenAI realtime) sends what the
extensions and appended instructions add. The OpenAI Responses Config
instruction now goes into the settings. BaseSystemInstruction returns
the prompt as the application set it, which Gemini Live seeds an empty
conversation with. The composition is logged at debug as
"System instruction composed: ".
An LLM settings update and a summary request go on once the LLM
service has handled them, so a later service a settings update also
targets applies it in turn. A service that takes its updates over
(SettingsUpdateDeferrer, as Rime realtime does) still keeps them.
The LLM service starts and stops before its extensions see the
lifecycle frame. On a StartFrame the sequential call runner is created
and the configured tools are synced before any extension processes the
frame; on an EndFrame or CancelFrame the runner and the summary generation
are stopped first. Extensions used to see these frames first.
Tool resources are released while the provider connection is still
open. The OpenAI Responses service over WebSocket, OpenAI realtime, xAI
realtime and Gemini Live closed their connection before the tool cleanups
ran at teardown; they now run the LLM base's cleanup first.
An LLM extension attached while the service runs is handed the
metadata frames the service has seen in the order each kind first came,
instead of in random order.
Classifiers let go of the session's loop themselves while they wait:
the Jev, Zoom and Google decision clients send through an HTTP client whose
round trips and reads let go of it, and the tone classifier reads its model
off it. The turn classifier stop strategy, the voicemail detector, the
perception reader and predictive delegation now ask their classifier
directly instead of wrapping the whole question in tasks.Await, so a
classifier's own work runs on the loop between its waits. A custom
classifier that blocks must wait through tasks the way these do.
Eval runs run on one loop with the client's pipeline: the session is a
task of the loop the client's worker runs on, and its waits (the
handshake, the bot's events, the judge, stopping) let go of it. Between bot-ready and the driver registering the persona's end_call, the
persona can no longer answer the bot, so a simulation whose persona ends
the call at once no longer loses the call's end and runs to its time limit.
A run made from a task is part of that task, on its loop, and a client
started from a task runs its pipeline on that task's loop.
The client runs its pipeline's worker through a workers.Runner, which
ends with it, cancels it on an interrupt signal, and is canceled when the
pipeline does not wind down in time.
Eval waits wait the way the run's loop expects. The event stream's
queue is a tasks.Queue and the bot being quiet or fully transcribed are tasks.Events, waited on by the run with its task. The judge sets its
classifier up once, as a task the first question starts and the others wait
for, and asks its questions together with tasks.Gather; its questions,
the explainer's calls and the client's audio writes no longer run wholly
off the loop, and only the network lets go of it.
Websocket server, websocket client and WebRTC outputs send what they
send as a call ends (the serializer's hang-up, the disconnect) before the
EndFrame or CancelFrame goes on downstream. Sent after it, the pipeline could
finish first, and the server transport then closed the socket without the
close frame, so the client saw the connection drop instead of a normal
closure. The websocket client's input disconnects as it stops reading, and
the local audio output closes its playback stream at cleanup.
AssemblyAI sends the audio held short of a whole chunk ahead of each
ForceEndpoint, so the final covers the end of the turn; a tail under 20 ms
(the shortest chunk AssemblyAI accepts) starts the next chunk instead. The
last tail is padded to 20 ms as the session terminates. A ForceEndpoint with
nothing to end now confirms the finalize, so the user turn no longer waits
out the transcription timeout.
Cartesia, Sarvam and AssemblyAI transcription no longer report a send
error for audio that reaches a connection the server has just closed: it is
dropped, as audio for a closed connection always was. Sarvam's realtime
transcription no longer buffers audio once its connection is closed.
Streaming transcription keeps sending audio after one send fails. The
service used to stop feeding a session after its first failed send until the
session was replaced; only that chunk is lost now, and a provider that
reports its failed sends reports each of them.
AssemblyAI transcription keeps the audio it has not sent yet across a
reconnect: the audio short of a whole chunk and the audio that arrives while
the connection is down go out at the start of the next session, rather than
being lost with the session that dropped. A provider that buffers this way
implements the new optional stt.AudioBufferer.
AssemblyAI and Speechmatics transcription log a warning when the server
does not acknowledge the end of the session in time (the Termination or the
EndOfTranscript); it was logged at debug level. A provider reports this
through the new optional stt.DrainTimeoutReporter.
Flows no longer hang when the user interrupts an action. FunctionActionFrame and ActionFinishedFrame are uninterruptible, so a tts_say cut short still ends and a function action queued behind it
still runs; before, the interruption dropped them and entering the node
never returned.
Flows end a function action whose handler panics, as they already did
for one that returns an error, so the actions after it no longer wait
forever.
Flows stop waiting for an action to finish when the context of the
call that is entering the node ends, so a pipeline that stops while an
action is in flight no longer leaves Initialize, SetNode or a
transition blocked.
Flows errors read as the message alone, worded as the flow reports it
elsewhere ("Failed to set node checkout: Node 'checkout' missing required
'task_messages' field"), without the sentinel's text in front. A failing
action handler's error stays matchable with errors.Is through the ErrAction it caused. SetNode before Initialize returns the ErrFlowTransition itself rather than wrapped in a failure to set the node.
An action with no type no longer fails while the node registers its
actions: it fails when its list runs, so the actions ahead of it have run.
Flows answer a node function that returns no result: the call reports {"status": "acknowledged"} and the model responds, as it already did for
a function that transitions. An empty result used to leave the model silent
until the user spoke again.
FlowsNewFlow accepts the same handler found in more than one of the Handlers maps (the same *NodeFunction, copies of one NodeFunction, or
the same ActionHandler); only a name that resolves to different handlers
is ambiguous. Passing a subset of an application's handlers next to the full
set used to fail.
Flows give the reset-with-summary summarizer the whole conversation:
the history is the list of messages in the universal format, written as a
list of dicts, so tool calls, tool results and content parts reach it. Only
the text of each message used to be written, and a tool call or a message in
parts reached the summarizer empty.
Flows reset-with-summary follows the rest of the flow more closely. A
summary that fails or times out switches the strategy it came from to
append for good, so later nodes no longer retry it and wait out the timeout
again. Without aggregators the node resets without a summary instead of
appending. A node's own ContextStrategy is validated when the node is
entered, so a reset-with-summary without a SummaryPrompt is refused.
Flows fill a {{ key }} placeholder with the value written the way the
rest of the flow writes values into prompts: True, None, 2.0, [1, 2], {'a': 1}, where Go's formatting gave true, <nil>, 2, [1 2] and map[a:1]. Strings and integers are unchanged.
FlowsNewFlow validates its config first, so a FlowConfig built in
code is held to what a loaded one is and returns its *FlowConfigError.
An initial node that does not exist, or a transition to one, used to build
and fail only when the flow got there.
YAML flow configs holding more than one document (a second one after ---), and files they !include that do, are refused with yamlutil.ErrMultipleDocuments; only the first document used to be read
and the rest ignored.
Flow configs keep a branch's cases in the order the document wrote
them: FlowConfigBranch.Targets lists them in that order, a branch with
several unknown targets reports the first written, and a config written back
as JSON keeps the order. They used to come out sorted by key.
Flow configs treat an optional text field written as an empty string as
a value rather than as absent, and validate it: transition_to: "" is a
transition to an unknown node, role_message: "" or context_strategy: ""
on a node that runs a subflow is refused, return_to: "" on a prompt node
and flow: "" are refused, handler: "" on tts_say or end_conversation is refused, and context_strategy: "" must be append
or reset. These configs used to load.
Deprecated
flows.ContextStrategyResetWithSummary and flows.ContextStrategyConfig.SummaryPrompt: summarize with the aggregators
instead, pushing a frames.LLMSummarizeContextFrame in a pre-action to
summarize during a node transition. A flow manager logs a deprecation
warning the first time a node uses the strategy.
flows.NodeConfig.RoleMessages, new and deprecated at once: a persona given
as messages, which lead the node's messages in the conversation. Use RoleMessage, which sets the system instruction and takes precedence when
both are set (a warning says so). A manager warns the first time a node
uses it.
flows.LegacyActionHandler, flows.ZeroArgFunctionHandler, flows.LegacyFunctionHandler and flows.FlowResult, new and deprecated at
once: an action handler given only the action, and function handlers given
no arguments or only the arguments, which their ActionHandler and Handler methods convert. A Flow's handlers take a legacy action handler
as it is. A manager warns the first time it runs each shape. FlowResult
is a status and error result convention with no replacement.
flows.DirectFunctionOptions, new and deprecated at once: it returns the flows.ToolOptions it is given and logs that it is deprecated. Pass the
options directly.
Removed
Breaking:eval.EventStream.WaitBotTurnClosed. The persona's relay no
longer waits for the bot's turn to close before it records the persona's
answer: with the run, the client's pipeline and its event handlers on one
loop, the bot-turn aggregator's report of the turn runs first. No
replacement.
The cgo binding of the ONNX Runtime. A build with cgo on used to bind
the runtime through Microsoft's Go binding, and only a build with cgo off
used the purego binding the release images ship. Every build now uses the
purego binding, so the tests, a developer's machine and the images run the
same code; the github.com/microsoft/onnxruntime/go dependency is gone. The
runtime is still located through JARGO_ONNXRUNTIME_LIB as before.
make build-matrix, which compiled the tree with cgo off and then on, is
now make build, with cgo off only: nothing in the tree depends on cgo.
Release binaries. A GitHub Release now carries the release notes only:
the two example programs (jargo-echo, jargo-voicebot) are no longer built
and attached, nor are the signed checksums that covered them. jargo is a
library, and Go users get a release from the module proxy, verified against
the checksum database. The container images are still published.