Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#71,987 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
backend, testing

Direzione di ricerca

Leggi containers/api-proxy/body-transform.js, in particolare injectStreamOptions, e i casi esistenti in body-transform.test.js. Aggiungi test di regressione per i percorsi rawPredict e streamRawPredict, inclusi v1beta1 e le stringhe di query, quindi verifica che le richieste compatibili con OpenAI di Vertex continuino a ricevere stream_options. Il lavoro è completato quando questi casi passano e la richiesta Claude su Vertex segnalata non riceve più il campo aggiuntivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
5.5k
Fork
606
Merge medio
4h 8m
PR unite (30g)
813

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/gh-aw

Tutte le issue di github/gh-aw

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.