Add a per-run limit for tool calls

Aperta
#1,202 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Lokesh118 ci sta già lavorando.

Dal 27/10/2026.

  • #1331 di @Lokesh118 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
ai

Direzione di ricerca

Start by locating the Go tool loop and its existing iteration limit, then compare the requested behavior with Python's max_function_calls. Add a per-run call budget that is checked between iterations without interrupting a batch already in progress, and verify that runs cannot exceed the configured total across iterations.

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

Descrizione

I noticed Go has an iteration limit for the tool loop, but I couldn't find a way to cap the total number of tool calls in a single run.

Those aren't quite the same thing when the model returns several tool calls in one turn. A run can stay within the iteration limit and still make a lot of external calls.

Would be nice to have something similar to Python's max_function_calls on the Go side.

This would be especially useful for tools hitting paid APIs or other external services, where having a simple call budget is a useful safety net.

I don't think it needs to interrupt a batch that's already running - matching the Python behavior and applying the limit between iterations seems reasonable.

Lingua principale
Go
Stelle
659
Fork
67
Merge medio
18h 49m
PR unite (30g)
81

Preparare l'ambiente

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 microsoft/agent-framework-go

Tutte le issue di microsoft/agent-framework-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.