[Bug]: Testing agent gives one service's tools inconsistent name prefixes, so the model calls names that don't exist
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Kotlin
- Star
- 210
- Fork
- 45
- Merge trung bình
- 12 giờ 24 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của android/appfunctions
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
android/appfunctions#66 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
android/appfunctions#62 ·
-
[FR]: Testing agent should handle AppFunctionUriGrant results and pass returned images to the modelĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
android/appfunctions#63 ·
-
Clarify production invocation, Android Auto support, and Android 16 fallback in AppFunctions docsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
android/appfunctions#51 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
android/appfunctions#50 · 1 bình luận ·
Tất cả issue của android/appfunctions
Issue tương tự
-
[Bug] Web Player: Misalignment in lyrics toolbar with format dropdown ('Auto') and download iconĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kushagrasinghx/BitChord#1269 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[📚] migrating-to-v27: Android fails on Expo SDK 58 (Kotlin 2.2) — document the BoM 34.19.0 overrideĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
invertase/react-native-firebase#9418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
react/react-native#59693 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Keep a caller-supplied `screen` entity instead of attaching the tracker’s current screenCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100