Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Function calls with 'id' fails with 400 using Gemini

オープン
#694 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@hemasekhar-p がすでに取り組んでいます。

2025年12月8日 から。

  • #973 @YuqiGuo105 による — オープン

評価

この issue はまだ評価されていません。

説明

priority: p2 type: bug

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
  1. Use a multi agent setup using Java Google ADK (v 0.3.0) with a function call.
  2. 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.
  3. I patched the java-genai package to add @JsonIgnore in FunctionCall and FunctionResponse.
    @JsonProperty("id") @JsonIgnore public abstract Optional<String> id();
  4. 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!

主要言語
Java
スター
398
フォーク
126
平均マージ
1日 12時間
マージ済み PR(30日)
71

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleapis/java-genai のほかの issue

googleapis/java-genai の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。