all `client.webhooks` operations fail with API error occurred: Status 404
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Start by tracing how client.webhooks builds its request path and how the client selects the API version from HttpOptions; the issue identifies /v1/webhooks and /v1beta as the failing and working routes. Check the webhooks tests and add coverage showing that management calls use v1beta routing by default while other client routing remains unaffected. Done means the reported 404 is covered and webhook list and create calls use the deployed route.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
In the latest major version (v3.0.0+), all client.webhooks operations—including client.webhooks.list() and client.webhooks.create()—fail with a google.genai._gaos.errors.genaidefaulterror.GenAiDefaultError: API error occurred: Status 404.
This occurs because v3.0.0 changed the default developer API routing version to v1. However, the Gemini webhooks subsystem is currently only deployed on the v1beta path structure. Because the SDK makes calls directly to /v1/webhooks, Google's production servers reject the route with a standard 404 HTML document page. The SDK should explicitly default to v1beta routing internally for webhooks management.
Environment Details
- SDK Package:
google-genai(v3.0.0 and above) - Auth Layer: Google AI Studio developer API key (
api_key="...")
Steps to Reproduce
from google import genai
# Standard initialization defaults to /v1/ routes in v3.0.0+
client = genai.Client(api_key="VALID_GEMINI_KEY")
# Triggers the 404 exception loop instantly
webhooks = client.webhooks.list()
Traceback Log
google.genai._gaos.errors.genaidefaulterror.GenAiDefaultError: API error occurred: Status 404 Content-Type text/html. Body: ""
...
google.genai._gaos.lib.compat_errors.NotFoundError: Error code: 404
Working Workarounds
Workaround 1: Explicitly pass HttpOptions to the Client (Recommended)
You can override the client's automated route configuration to force the endpoint path back to v1beta where the webhooks framework is live:
from google import genai
from google.genai.types import HttpOptions
client = genai.Client(
api_key="YOUR_GEMINI_API_KEY",
http_options=HttpOptions(api_version="v1beta")
)
# This succeeds perfectly
webhooks_list = client.webhooks.list()
Workaround 2: Environment Variable Override
Setting the framework version override globally in the active terminal environment shell also bypasses the 404 issue:
- Windows Cmd:
set GOOGLE_GENAI_API_VERSION=v1beta - PowerShell:
$env:GOOGLE_GENAI_API_VERSION="v1beta" - Linux/macOS:
export GOOGLE_GENAI_API_VERSION="v1beta"
- Lingua principale
- Python
- Stelle
- 4.1k
- Fork
- 1.1k
- Merge medio
- 1g 20h
- PR unite (30g)
- 99
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di googleapis/python-genai
-
Interactions retries ignore the documented `initial_delay` and `max_delay` defaultsForse già presa @Sun-Wukhan l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
googleapis/python-genai#3317 ·
I maintainer di solito rispondono entro 1 giorno
-
Test import module that doesn't existForse già presa @Venkaiahbabuneelam l’ha presa 25 giorni fa. Apertapriority: p2 type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
googleapis/python-genai#3122 · 6 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Curated history keeps half a user turn when the model turn is invalidForse già presa @Venkaiahbabuneelam l’ha presa 34 giorni fa. Apertapriority: p2 type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
googleapis/python-genai#3051 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Unsubscripted typing.List and typing.Dict crash convert_if_exist_pydantic_model in AFCForse già presa @Venkaiahbabuneelam l’ha presa 34 giorni fa. Apertapriority: p2 type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
googleapis/python-genai#3044 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Curated chat history ends on an unanswered function_call when the turn after AFC is invalidForse già presa @copybara-service l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
googleapis/python-genai#3314 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di googleapis/python-genai
Issue simili
-
S9.7: Methodology pageApertaarea: web priority: P1 story
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
nfiasco/Quant-Time-Machine#151 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links found in docsApertadocs pydanty:is-working
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
pydantic/pydantic-ai#12892 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
Azure/azure-sdk-for-python#49886 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Core] Deprecated(error=True) raises only on the first call; later calls run the removed APIForse già presa @wguo7 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ray-project/ray#67965 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
btclib-org/btclib#3006 ·
I maintainer di solito rispondono entro 1 giorno