LLM-as-judge default config triggers google-genai's AFC warning in every eval run
@surajksharma07 がすでに取り組んでいます。
2026年9月17日 から。
評価
- 難易度
- 1/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
LlmAsJudge が judge リクエスト用のデフォルトの GenerateContentConfig を作成している src/google/adk/evaluation/llm_as_judge.py:224-225 から開始します。デフォルト設定で自動 function calling が無効になっていることを、ユーザーが指定した judge_model_config を変更せずに確認し、その後、関連する評価チェックを実行して google-genai の AFC 警告が表示されなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 21.6k
- フォーク
- 4k
- 平均マージ
- 13時間 49分
- マージ済み PR(30日)
- 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/adk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/adk-python#7217 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
google/adk-python#7206 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
google/adk-python#7205 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
google/adk-python#7196 · コメント 1 件 ·
-
mcp
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
google/adk-python#7144 · コメント 1 件 · 担当者 1 名 ·
google/adk-python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zostera/django-bootstrap4#894 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·