feat(integrations): add a Gemini Decisions classifier
I maintainer di solito rispondono entro 3 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
ADK's classifier interface (BaseClassifier, ClassifierNode) has first-party support for generative classification (LlmClassifier) and for third-party decision models (TypesafeClassifier, OpenAIDecisionsClassifier). There is no integration for Google's own decision model. Users who want calibrated probabilities for routing and gating, without a generation step, cannot use Gemini Decision 1 through ADK.
Proposal
Add GeminiDecisionsClassifier in google.adk.integrations.gemini_decisions. It implements BaseClassifier over the public Gemini Decisions API.
API summary
POST https://generativelanguage.googleapis.com/v1beta/decisions, modelgemini-decision-1,x-goog-api-keyheader.Binarymaps tonoul,Choicetochoice, andScoretoscore. All questions go in one request, and answers come back as calibrated probabilities with aconfidencevalue.- A request blocked by the input safety filters returns HTTP 400 with a code such as
safety. The classifier returns aRefusalAnswerfor every question.
google-genai version note
The Decisions API in the google-genai SDK needs google-genai >= 3.2, but every google-adk release up to 2.15.0 pins google-genai >= 2.34, < 3. So the classifier calls the REST API directly with httpx, as TypesafeClassifier does. It adds no dependency, and can move to the SDK once the pin allows it.
Design notes
base_url,timeout,max_attemptsandhttp_clientmirrorTypesafeClassifier. Retries cover 429, 5xx, timeouts and dropped connections, and honourretry-after.- The default client uses ADK's mTLS helpers.
- Input can be text, JSON, or a
types.Contentwith inline image, audio, video or PDF parts. - The docs will state that the API sorts option keys alphabetically, that
confidenceis the top probability, and that input is untrusted, so a classifier should not be the only gate on an action that changes access. - It targets the public Gemini API only.
base_urlleaves room for other endpoints later.
Question
Is integrations/gemini_decisions/ the right home, or would maintainers prefer labs/classifiers/ for a first-party Google model?
I have a working branch with unit tests and a unit guide, and I am happy to open a PR.
- Lingua principale
- Python
- Stelle
- 22.3k
- Fork
- 4.4k
- Merge medio
- 1g 2h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 google/adk-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
google/adk-python#8360 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
google/adk-python#8359 ·
I maintainer di solito rispondono entro 3 giorni
-
Can pin to litellm version be changed?Forse già presa @llalitkumarrr l’ha presa 10 giorni fa. Apertamodels
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
google/adk-python#8129 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
OpenAPI tools ignore operation- and path-level server overridesForse già presa @sanketpatil06 l’ha presa 14 giorni fa. Apertatools
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
google/adk-python#8064 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Two docstrings in openapi_tool document parameters the signatures do not acceptForse già presa @surajksharma07 l’ha presa 17 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
google/adk-python#8024 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di google/adk-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vllm-project/vllm#70030 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TigreGotico/tugaphone#408 ·
I maintainer di solito rispondono entro 1 giorno
-
t: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
Azure/azure-sdk-for-python#50155 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno