Raise a ValueError when a tool's inputs_from_state key is missing from the Agent's state_schema

Abierto
#13,920 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Read haystack/components/agents/agent.py and the unit tests for _warn_on_inputs_from_state_missing_from_schema; check the State docs page and the release note format for upgrade notes. Replace the warning behavior with the specified error and rename the helper, then update tests, docs, and the upgrade release note. The issue says this work will be handled internally and is not open to external contributions.

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

Descripción

handled internally

Follow up to #13891

Since #13891, the Agent emits a FutureWarning at the start of each run when a tool's inputs_from_state reads a key that is not declared in the Agent's state_schema. State only holds keys from the schema, so such a key is never injected and the tool runs on its default or fails.

The warning says this will raise a ValueError starting with Haystack 3.7.

To do
  • Replace the FutureWarning in _warn_on_inputs_from_state_missing_from_schema (haystack/components/agents/agent.py) with a ValueError and rename the helper accordingly
  • Update the unit tests to expect the error
  • Update the State docs page, which says the Agent emits a FutureWarning
  • Add an upgrade release note

👋 Hello there! This issue will be handled internally and isn't open for external contributions. If you'd like to contribute, please take a look at issues labeled contributions welcome or good first issue. We'd really appreciate it!

Lenguaje dominante
Python
Estrellas
27.1k
Forks
3.5k
Merge medio
1 d 8 h
PR fusionados (30 d)
239

Preparar el entorno

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 deepset-ai/haystack

Todos los issues de deepset-ai/haystack

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.