0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gemini API Antigravity Agent 09-2026で破壊的変更、旧版は10/5停止

0
Posted at

はじめに

2026年9月17日、Google の Gemini API から Antigravity Agent の新バージョン antigravity-preview-09-2026 がリリースされました。これは既存の antigravity-preview-05-2026 を置き換えるものであり、旧版は同時に非推奨(deprecated)となっています。

一見すると「バージョンが上がっただけ」のマイナーアップデートに見えますが、実態は 破壊的変更(Breaking Change)を含むリリース です。しかも旧版のシャットダウン予定日は 2026年10月5日 と、リリースからわずか3週間弱しか猶予がありません。

  • リモートサンドボックス(environment: "remote")で output_textmodel_output だけを読んでいる人 → 影響は軽微
  • ローカル環境(local_environment)でツールを実行、または function_call ステップを解析している人 → コードの修正が必須

この記事では、何が変わったのか、誰が対応を迫られるのか、具体的にどうコードを書き換えればよいのかを整理します。

📌 影響を受ける人
Antigravity Agent をローカル実行環境で使い、write_file / read_file / list_files などのビルトインツールを自前で実装している開発者、または function_call ステップの内容をパースして処理を分岐させている開発者は、必ず対応が必要です。

変更の全体像

今回のリリースで影響範囲が大きく分かれるポイントは「エージェントをどの環境で動かしているか」です。全体像を図にまとめます。

リリースと非推奨化のタイムラインは以下の通りです。

⚠️ Breaking Change
リリースから旧版停止まで約18日しかありません。ローカルツール実装をしている場合は、今すぐ棚卸しを始めることを強く推奨します。

変更内容

1. 新モデルのリリースと旧モデルの置き換え

antigravity-preview-09-2026antigravity-preview-05-2026 を置き換える形でリリースされました。リモート実行かつ出力のみを参照する構成であれば、モデル指定文字列を変更するだけで移行が完了します。

2. ビルトインツールの名称・パラメータ変更(最重要)

ローカル環境でツールを実行している場合、または function_call ステップを解析している場合に影響する変更です。パラメータ命名規則が snake_case から PascalCase に変わり、ファイル編集の方式も「全書き換え」から「行範囲置換」に変更されています。

用途 05-2026(旧) 09-2026(新) 主な変更点
ファイル作成 write_file(path, content) write_to_file(TargetFile, CodeContent, Overwrite, Description) 引数が PascalCase 化、Description 追加
ファイル編集 write_file(path, content)(全書き換え) replace_file_content(TargetFile, StartLine, EndLine, TargetContent, ReplacementContent) 全書き換え → 行範囲置換 に方式変更
ファイル読取 read_file(path, offset, limit)(バイトオフセット) view_file(AbsolutePath, StartLine, EndLine, ContentOffset) オフセット単位がバイト→行に変更
ディレクトリ一覧 list_files(path) list_dir(DirectoryPath) 引数名変更のみ
ファイル・コード検索 なし(シェルコマンドで代用) find_by_name(SearchDirectory, Pattern, MaxDepth)
grep_search(SearchPath, Query, IsRegex)
新設ツール
シェル実行 code_execution(command, timeout_seconds) 変更なし
Web検索 google_search(queries) 変更なし

3. 旧版の非推奨・シャットダウン

antigravity-preview-05-2026 は非推奨となり、2026年10月5日 に停止されます。停止スケジュールは Google の deprecations ページで追跡されているため、定期的な確認が必要です。

影響と対応

リモート実行・出力のみ参照している場合

対応は非常にシンプルです。

  • エージェント指定文字列を antigravity-preview-05-2026antigravity-preview-09-2026 に更新
  • output_text / model_output のパース処理に変更が必要ないか一応確認

ローカルでツールを実装・function_call を解析している場合

以下のチェックリストで棚卸しすることを推奨します。

  • write_file を呼んでいる箇所を write_to_file / replace_file_content に分離して置き換える
  • 全ての引数を snake_casePascalCase に変換する
  • 「ファイル編集=全書き換え」を前提にしたロジックを、行範囲(StartLine / EndLine)指定の部分置換に書き換える
  • read_file のバイトオフセット処理を view_file の行番号ベースに書き換える
  • シェルコマンドで代用していたファイル検索・grep 相当の処理を find_by_name / grep_search に置き換え、シェル呼び出しを削減する
  • function_call の名前・引数構造をパースしているコード(バリデーション、ロギング含む)を新スキーマに合わせて更新する

💡 Tips
code_executiongoogle_search は変更されていないため、この2つに依存する処理はそのまま流用できます。差分対応の優先順位は「ファイル編集系」から着手するのが効率的です。

コード例

ファイル作成・編集ツールのハンドラ

Before(05-2026 相当のハンドラ)

def handle_write_file(args):
    path = args["path"]
    content = args["content"]
    # 常に全書き換え
    with open(path, "w") as f:
        f.write(content)

After(09-2026 対応)

def handle_write_to_file(args):
    path = args["TargetFile"]
    content = args["CodeContent"]
    overwrite = args["Overwrite"]
    if not overwrite and os.path.exists(path):
        raise FileExistsError(path)
    with open(path, "w") as f:
        f.write(content)

def handle_replace_file_content(args):
    path = args["TargetFile"]
    start_line = args["StartLine"]
    end_line = args["EndLine"]
    replacement = args["ReplacementContent"]

    with open(path, "r") as f:
        lines = f.readlines()

    # 行範囲だけを置換する(全書き換えではない)
    lines[start_line - 1:end_line] = [replacement]

    with open(path, "w") as f:
        f.writelines(lines)

ファイル検索ツールの新設分

Before(シェルコマンドで代用)

def find_files(pattern, directory):
    result = subprocess.run(
        ["find", directory, "-name", pattern],
        capture_output=True, text=True
    )
    return result.stdout.splitlines()

After(ビルトインツール利用)

def handle_find_by_name(args):
    return search_files(
        directory=args["SearchDirectory"],
        pattern=args["Pattern"],
        max_depth=args.get("MaxDepth"),
    )

def handle_grep_search(args):
    return search_content(
        path=args["SearchPath"],
        query=args["Query"],
        is_regex=args["IsRegex"],
    )

find_by_name / grep_search が新設されたことで、シェルコマンド呼び出しに依存していた検索処理をエージェント標準のツールに寄せられます。セキュリティ的にも任意コマンド実行の経路を減らせるメリットがあります。

まとめ

  • antigravity-preview-09-2026 がリリースされ、antigravity-preview-05-2026 は非推奨・2026年10月5日にシャットダウン予定
  • リモート実行で出力のみ参照している場合は、モデル文字列の更新だけで対応完了
  • ローカル実行でツールを自前実装、または function_call を解析している場合は、破壊的変更として以下への対応が必須
    • ツール名変更(write_filewrite_to_file / replace_file_content など)
    • パラメータの snake_casePascalCase
    • ファイル編集方式の「全書き換え」→「行範囲置換」への変更
    • find_by_name / grep_search という新設ツールへの移行検討
  • 移行猶予が短いため、ローカルツール実装をしているプロジェクトは今すぐ棚卸しと修正着手を推奨します

詳細な仕様は Antigravity Agent ガイド(公式ドキュメント)を参照してください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?