[Bug]: Testing agent gives one service's tools inconsistent name prefixes, so the model calls names that don't exist
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
Start by locating GeminiToolConverter.getGeminiFunctionName and trace how converted function names are matched when the Gemini provider receives a tool call; the report also names GeminiProviderImpl as a possible entry point. Reproduce with one service whose methods cross the 64-character cutoff at different points, then verify that its tools have consistent names or that calls resolve correctly; the issue provides no test file to run.
索引モデルが issue の本文から書いたものです。
説明
Description
The Testing Agent shortens each AppFunction id to a Gemini function name of at most 64 characters by keeping as many _-separated parts as fit, from the right (GeminiToolConverter.getGeminiFunctionName). Because the cutoff depends on each method's length, the tools of one service end up with different prefixes:
com.example.app.feature.notes.ExampleNotesAppFunctionService#addNote
-> example_app_feature_notes_ExampleNotesAppFunctionService_addNote
com.example.app.feature.notes.ExampleNotesAppFunctionService#updateNoteSettings
-> feature_notes_ExampleNotesAppFunctionService_updateNoteSettings
com.example.app.feature.notes.ExampleNotesAppFunctionService#getNoteFieldDescriptions
-> notes_ExampleNotesAppFunctionService_getNoteFieldDescriptions
The model generalizes from the majority and "corrects" the others, so it calls names that don't exist, for example:
Called unknown function: feature_notes_ExampleNotesAppFunctionService_getNoteFieldDescriptions
We also saw a doubled prefix (the shortened prefix repeated in front of a full name) from the same confusion. Each failure ends the agent's turn.
Steps to reproduce
- Expose a service with a long package and class name and methods of varying length (anything that crosses the 64-character cutoff at different parts).
- Run a task in Agent Demo that needs one of the longer-named functions.
- The model calls a prefixed variant and the agent reports
Called unknown function.
Suggested fix
Any of these would help:
- Give all tools of one service the same prefix, e.g. pick the cutoff once per service (the deepest part every method of that service fits), or use
ClassName_methodwith a short hash when even that exceeds 64 characters. - Resolve calls tolerantly: when the exact name is unknown, fall back to the unique tool whose name ends with the called name's
ClassName_methodsuffix. A local patch doing this inGeminiProviderImplremoved the errors in our testing.
Environment
- Testing Agent at a3a2a89 (main, Oct 23, 2026)
- androidx.appfunctions 1.0.0-beta01
- Android 17 (API 37) emulator, model gemini-3.5-flash
Related: #62, #63.
- 主要言語
- Kotlin
- スター
- 210
- フォーク
- 45
- 平均マージ
- 12時間 24分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
android/appfunctions のほかの issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
android/appfunctions#66 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
android/appfunctions#62 ·
-
[FR]: Testing agent should handle AppFunctionUriGrant results and pass returned images to the modelオープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
android/appfunctions#63 ·
-
Clarify production invocation, Android Auto support, and Android 16 fallback in AppFunctions docsオープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
android/appfunctions#51 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
android/appfunctions#50 · コメント 1 件 ·
android/appfunctions の issue をすべて見る
似ている issue
-
[BUG] setTargetSourceSet scans the whole classpath once for every class, so scanning is very slowオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
sergio-sastre/ComposablePreviewScanner#156 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sameerasw/essentials#1621 ·
メンテナーはふだん 1 日以内に返信
-
pending:code-area pending:issue-category to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
T31n/YagniLauncher#1096 ·
メンテナーはふだん 1 日以内に返信
-
win_build: parallel PostBuildEvent race in example_app_atiopencl and example_app_nvopencl copying openclapp_kernels.cl対応中かも @qixuancao が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信