Function calls with 'id' fails with 400 using Gemini
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is this a client library issue or a product issue? We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.
If the support paths suggested above still do not result in a resolution, please provide the following details.
Environment details
- Programming language: Java
- OS: Linux
- Language runtime version: 17
- Package version: 1.8.0
Steps to reproduce
- Use a multi agent setup using Java Google ADK (v 0.3.0) with a function call.
- When LLM returns response to invoke a function call, agent invokes and sending the response back to Gemini causes
com.google.genai.errors.ClientException: 400 . Invalid JSON payload received. Unknown name "id" at 'contents[5].parts[0].function_call': Cannot find field. Invalid JSON payload received. Unknown name "id" at 'contents[6].parts[0].function_response': Cannot find field. - I patched the java-genai package to add @JsonIgnore in FunctionCall and FunctionResponse.
@JsonProperty("id") @JsonIgnore public abstract Optional<String> id(); - Ran the agent again, and it succeeded.
It looks like Google Gemini does not expect 'id' in Functions but java-genai sends it.
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
- Lenguaje dominante
- Java
- Estrellas
- 398
- Forks
- 126
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 71
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 googleapis/java-genai
-
ResponseStream.close() can block on the reader lock before closing the HTTP responsePosiblemente ocupada @hirematha la tomó hace 2 días. Abiertopriority: p2 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
googleapis/java-genai#1372 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Interactions API: GaosClientException.getMessage() only returns "400 . API error occurred" and omits the server error detailsPosiblemente ocupada @hemasekhar-p la tomó hace 26 días. Abiertopriority: p2 type: bug
googleapis/java-genai#1282 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Interactions API: store(false) omits "id", breaking Interaction and InteractionCompletedEvent deserializationPosiblemente ocupada @hemasekhar-p la tomó hace 26 días. Abiertopriority: p2 type: bug
googleapis/java-genai#1281 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Interaction.outputText() always returns Optional.empty() (SDK-computed field is never populated)Posiblemente ocupada @hemasekhar-p la tomó hace 26 días. Abiertopriority: p2 type: bug
googleapis/java-genai#1280 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Gen AI with structured output - `propertyOrdering` in Python vs. Java implementationsPosiblemente ocupada @hemasekhar-p la tomó hace 80 días. Abiertopriority: p3 type: feature request
googleapis/java-genai#1169 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de googleapis/java-genai
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
quarkusio/quarkus-agent-mcp#302 ·
Los mantenedores suelen responder en 2 días
-
build
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
MetricsHub/metricshub-community#1472 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
IdentityArrayObjectSet iterator remove may throw ArrayIndexOutOfBoundsExceptionPosiblemente ocupada @jiteshkhatri11 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
javapathfinder/jpf-core#660 · 1 comentario ·