LLM-as-judge default config triggers google-genai's AFC warning in every eval run
@surajksharma07 ya está trabajando en esto.
Desde el 17/9/2026.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 86/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- testing-qa
Línea de trabajo
Empieza en src/google/adk/evaluation/llm_as_judge.py:224-225, donde LlmAsJudge crea la GenerateContentConfig predeterminada para las solicitudes del juez. Verifica que el valor predeterminado desactive el function calling automático sin cambiar la judge_model_config proporcionada por el usuario; después, ejecuta las comprobaciones de evaluación pertinentes y confirma que la advertencia de AFC de google-genai ya no aparece.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Every rubric-based eval run logs this google-genai warning once per process:
WARNING google_genai.models: Direct use of automatic function calling (AFC) in AsyncModels.generate_content is not recommended. Instead, we recommend to use AFC in AsyncChat.send_message. Similarly, direct use of AFC in AsyncModels.generate_content_stream is not recommended. ...
The agent under evaluation does not cause it. It comes from the LLM-as-judge request.
Where it comes from
LlmAsJudge builds the judge request with config=self._judge_model_options.judge_model_config or genai_types.GenerateContentConfig() (src/google/adk/evaluation/llm_as_judge.py:224-225 on main at ce53a36c0a, and the same in 2.9.0 and 2.9.1).
That default config sets neither tools nor automatic_function_calling. google-genai's AsyncModels.generate_content therefore takes its AFC branch and logs the warning:
_extra_utils.should_disable_afcreturnsFalsewhenautomatic_function_callingis unset.- With no tools there are no AFC-incompatible tool indexes, so the direct
_generate_contentpath is skipped.
An agent's own model calls do not hit this. ADK sends tools as function_declarations, which google-genai marks AFC-incompatible, so those calls go straight to _generate_content.
How it was observed
In an eval suite running rubric_based_*_quality_v1 metrics with gemini-3.5-flash as judge (google-adk 2.9.0, google-genai as resolved by it):
- The warning appears once per pytest process.
- It always appears right after the agent's inference for the case ends and right before the rubric verdicts.
- It never appears during the agent's own model calls.
- The deployed agent's logs, same code without the eval harness, contain no occurrence over 7 days.
Suggestion
The judge never needs automatic function calling. Its default config could disable it explicitly:
config=self._judge_model_options.judge_model_config
or genai_types.GenerateContentConfig(
automatic_function_calling=genai_types.AutomaticFunctionCallingConfig(disable=True)
),
This does not change the request sent to the model (the field is client-side only) and removes a warning that points users at their own agent. Users who pass judge_model_config are unaffected.
- Lenguaje dominante
- Python
- Estrellas
- 21.6k
- Forks
- 4k
- Merge medio
- 13 h 49 min
- PR fusionados (30 d)
- 10
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/adk-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
google/adk-python#7217 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
google/adk-python#7206 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
google/adk-python#7205 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
google/adk-python#7196 · 1 comentario ·
-
mcp
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
google/adk-python#7144 · 1 comentario · 1 asignado ·
Todos los issues de google/adk-python
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
zostera/django-bootstrap4#894 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
use-agent-os/agent-os#3276 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NousResearch/hermes-agent#117848 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
zilliztech/memsearch#759 ·