Responses conversion drops nested SDK tool-call history payloads

Aperta
#5,455 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #5456 di @dajiaohuang — chiusa senza merge
  • #5470 di @dajiaohuang — chiusa senza merge

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
ai

Direzione di ricerca

Start with the Responses history conversion builder, which reads name and arguments from the outer object for SDK ChatCompletionMessageToolCall calls instead of the nested function attribute. Reproduce through LLM.get_response with chat_history and stream=False using a fake Responses boundary. Done when the function_call item keeps the name and arguments, flat-object and dictionary inputs still work, and the two failing regressions pass. Check the closed, unmerged PRs #5456 and #5470 first to see why they did not land.

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

Descrizione

On main bb470c786b63a6a8d5e5f3abcfc6080f1a8832f1, Responses history conversion loses the function payload from OpenAI ChatCompletionMessageToolCall objects nested in assistant-message tool_calls.

For a call with id call_1, function name lookup and arguments {"key":"value"}, the resulting function_call item retains the ID but contains name="" and arguments="{}". The same call serialized with model_dump() preserves both fields. This also reproduces through public LLM.get_response(..., chat_history=..., stream=False) with a fake Responses boundary.

The builder reads the nested function for dictionary calls but reads name/arguments directly from the outer object for SDK calls. It should select the nested function attribute while retaining flat-object and dictionary compatibility.

Five regressions on unchanged main: two fail, three controls pass. No live provider request was run; this proves request construction rather than provider acceptance.

Lingua principale
Python
Stelle
9.3k
Fork
1.5k
Merge medio
1g 5h
PR unite (30g)
520

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 MervinPraison/PraisonAI

Tutte le issue di MervinPraison/PraisonAI

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.