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

api-proxy adds stream_options to Claude-on-Vertex requests, which then fail with 400

オープン 初心者向け
#71,987 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript
領域
backend, testing

調査の方向性

containers/api-proxy/body-transform.js、特に injectStreamOptions と、body-transform.test.js にある既存のケースを読みます。rawPredict と streamRawPredict の経路について、v1beta1 とクエリ文字列も含めて回帰テストを追加し、その後、Vertex の OpenAI 互換リクエストが引き続き stream_options を受け取ることを確認します。これらのケースが通り、報告された Claude-on-Vertex リクエストが余分なフィールドを受け取らなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

ai-inspected

Anthropic's Claude is officially available on Google Vertex AI (Google docs), and Claude Code supports it with CLAUDE_CODE_USE_VERTEX=1 (Claude Code docs). Requests send a Messages API body to .../publishers/anthropic/models/{model}:streamRawPredict.

When I route this through the AWF Vertex adapter (port 10004), every request fails with:

400 invalid_request_error: stream_options: Extra inputs are not permitted

Authentication via GCP WIF and model access both work. Calling the same model without AWF returns a normal response.

The field comes from injectStreamOptions in the api-proxy (code):

  • It adds stream_options so that token usage can be read from OpenAI-style requests.
  • Anthropic-style requests are skipped when the provider is anthropic or the path is /messages.
  • Claude on Vertex uses the vertex provider and a :streamRawPredict path, so neither check applies and the field gets added.

Skipping .../publishers/anthropic/models/{model}:rawPredict and :streamRawPredict should fix it. Vertex's OpenAI-compatible endpoint (/endpoints/openapi/chat/completions) can keep the current behavior. The patch and regression tests are available on this fork branch. Creating a draft PR against gh-aw-firewall was rejected with a CreatePullRequest permission error, so no PR is open yet.

The firewall change is limited to containers/api-proxy/body-transform.js. Add regression tests in body-transform.test.js for rawPredict / streamRawPredict, including v1beta1 and query strings, and verify that Vertex OpenAI-compatible requests still get the field. The new cases fail before the patch and pass after it. This fixes the body transformation only, not compiler support or token startup retries.

Versions: gh-aw v0.93.0, AWF v0.28.70, Claude Code 2.1.296. I set up the Vertex environment for Claude Code by hand. Compiler support is requested separately in #71985.

主要言語
Go
スター
5.5k
フォーク
606
平均マージ
4時間 13分
マージ済み PR(30日)
823

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

github/gh-aw のほかの issue

github/gh-aw の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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