api-proxy adds stream_options to Claude-on-Vertex requests, which then fail with 400
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
containers/api-proxy/body-transform.js、特に injectStreamOptions と、body-transform.test.js にある既存のケースを読みます。rawPredict と streamRawPredict の経路について、v1beta1 とクエリ文字列も含めて回帰テストを追加し、その後、Vertex の OpenAI 互換リクエストが引き続き stream_options を受け取ることを確認します。これらのケースが通り、報告された Claude-on-Vertex リクエストが余分なフィールドを受け取らなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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_optionsso that token usage can be read from OpenAI-style requests. - Anthropic-style requests are skipped when the provider is
anthropicor the path is/messages. - Claude on Vertex uses the
vertexprovider and a:streamRawPredictpath, 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
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/gh-aw のほかの issue
-
[doc-healer] DDUw improvement: retry integrity-filtered issue reads with direct single-item lookupsオープンautomation documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
automated-analysis code-quality cookie testing
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
ai-inspected
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
agent-research
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
automation cli cookie documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/gh-aw#72447 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yetone/magpie#4095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: Google Safe Browsing flags go-bonnie.dev as "deceptive" (pipe-to-shell install instructions)オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
[Bug]: Telegram bot (v3.11.0): "Ban log" no longer sends the current 3xipl-banned.log対応中かも @HamedSanaei が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
MHSanaei/3x-ui#6990 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
bug(tool/internal/instrument): identical inject_code rules from two rule packages are applied twiceオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-go-compile-instrumentation#1611 ·
メンテナーはふだん 2 日以内に返信