Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Provider tool call lifecycle events (start/done)

Aperta
#6,984 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Start with draft PR #6973, which the issue identifies as the implementation and says includes tests. Read how it translates provider stream events into provider_tool_call and bridges them to provider_tool_execution_updated; run the PR's tests. Done means consumers receive start and end events during provider-tool execution; the issue leaves naming and shape open for convergence.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

When a provider features server-side (provider-executed) tools, there's no way to change session state while one of those tools is running — for example, playing a background "thinking" sound for exactly as long as a web search takes, then stopping it when the search returns.

Provider tools run inside a single LLM stream, so the agent state machine never sees them start or finish, and preemptive_generation decouples the timing further. The agent thinking state isn't a reliable proxy.

#5869 adds a terminal function_tools_called event that fires once at the end of a turn. That's useful for post-turn analysis, but it comes too late to drive anything during execution, and it doesn't give a distinct start signal.

Proposal

Add a provider-tool lifecycle that mirrors the existing local-tool one (ToolCallStarted / ToolCallEnded via tool_execution_updated):

  • A plugin translates its provider stream (e.g. Mistral's ToolExecutionStarted / ToolExecutionDone) into a generic provider_tool_call event, emitted on the LLM's EventEmitter
  • The framework bridges that onto the session as provider_tool_execution_updated, carrying ProviderToolCallStarted | ProviderToolCallEnded.
  • Consumers subscribe once: session.on("provider_tool_execution_updated", ...).

Any provider with server-side tools gets the session event for free once it adds the translation in its plugin.

Draft PR

Implementation (pipeline path, with tests, mypy strict + ruff clean): #6973

It could complement #5869 (keep that as the per-turn summary, this as the lifecycle) or replace it — happy to converge on naming and shape. Realtime path and the remote_session protobuf relay are natural follow-ups.

Lingua principale
Python
Stelle
14.6k
Fork
3.9k
Merge medio
2g 9h
PR unite (30g)
159

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di livekit/agents

Tutte le issue di livekit/agents

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.