Responses conversion drops nested SDK tool-call history payloads

Abierto
#5,455 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #5456 de @dajiaohuang — cerrado sin fusionar
  • #5470 de @dajiaohuang — cerrado sin fusionar

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
ai

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
9.3k
Forks
1.5k
Merge medio
1 d 5 h
PR fusionados (30 d)
520

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MervinPraison/PraisonAI

Todos los issues de MervinPraison/PraisonAI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.