Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[Bug]: Testing agent gives one service's tools inconsistent name prefixes, so the model calls names that don't exist

Offen
#64 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
android, kotlin

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
  1. 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).
  2. Run a task in Agent Demo that needs one of the longer-named functions.
  3. 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_method with 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_method suffix. A local patch doing this in GeminiProviderImpl removed 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.

Vorherrschende Sprache
Kotlin
Sterne
210
Forks
45
Ø Merge
12 Std. 24 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus android/appfunctions

Alle Issues in android/appfunctions

Ähnliche Issues

Weitere Issues zu Kotlin

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.