all `client.webhooks` operations fail with API error occurred: Status 404
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 54/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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"
- Linguagem predominante
- Python
- Estrelas
- 4.1k
- Forks
- 1.1k
- Merge médio
- 1d 20h
- PRs com merge (30d)
- 99
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de googleapis/python-genai
-
Interactions retries ignore the documented `initial_delay` and `max_delay` defaultsTalvez já em andamento @Sun-Wukhan assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
googleapis/python-genai#3317 ·
Mantenedores costumam responder em até 1 dia
-
Test import module that doesn't existTalvez já em andamento @Venkaiahbabuneelam assumiu há 25 dias. Abertapriority: p2 type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
googleapis/python-genai#3122 · 6 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Curated history keeps half a user turn when the model turn is invalidTalvez já em andamento @Venkaiahbabuneelam assumiu há 34 dias. Abertapriority: p2 type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
googleapis/python-genai#3051 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Unsubscripted typing.List and typing.Dict crash convert_if_exist_pydantic_model in AFCTalvez já em andamento @Venkaiahbabuneelam assumiu há 34 dias. Abertapriority: p2 type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
googleapis/python-genai#3044 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Curated chat history ends on an unanswered function_call when the turn after AFC is invalidTalvez já em andamento @copybara-service assumiu há 1 dia. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
googleapis/python-genai#3314 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de googleapis/python-genai
Issues semelhantes
-
S9.7: Methodology pageAbertaarea: web priority: P1 story
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
nfiasco/Quant-Time-Machine#151 ·
Mantenedores costumam responder em até 1 dia
-
Broken links found in docsAbertadocs pydanty:is-working
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 85/100
pydantic/pydantic-ai#12892 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
Azure/azure-sdk-for-python#49886 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
[Core] Deprecated(error=True) raises only on the first call; later calls run the removed APITalvez já em andamento @wguo7 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ray-project/ray#67965 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
btclib-org/btclib#3006 ·
Mantenedores costumam responder em até 1 dia