feat(integrations): add a Gemini Decisions classifier
Los mantenedores suelen responder en 3 días
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 22.3k
- Forks
- 4.4k
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/adk-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
google/adk-python#8360 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
google/adk-python#8359 ·
Los mantenedores suelen responder en 3 días
-
Can pin to litellm version be changed?Posiblemente ocupada @llalitkumarrr la tomó hace 10 días. Abiertomodels
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
google/adk-python#8129 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
OpenAPI tools ignore operation- and path-level server overridesPosiblemente ocupada @sanketpatil06 la tomó hace 14 días. Abiertotools
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
google/adk-python#8064 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
Two docstrings in openapi_tool document parameters the signatures do not acceptPosiblemente ocupada @surajksharma07 la tomó hace 17 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
google/adk-python#8024 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 3 días
Todos los issues de google/adk-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vllm-project/vllm#70030 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TigreGotico/tugaphone#408 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
gke-labs/kube-agents#7308 ·
Los mantenedores suelen responder en 1 día
-
t: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
chore
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
lugassawan/swe-workbench#841 ·