feat(integrations): add a Gemini Decisions classifier
メンテナーはふだん 3 日以内に返信
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- Python
- スター
- 22.3k
- フォーク
- 4.4k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/adk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/adk-python#8360 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
google/adk-python#8359 ·
メンテナーはふだん 3 日以内に返信
-
Can pin to litellm version be changed?対応中かも @llalitkumarrr が 10 日前に担当しました。 オープンmodels
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
google/adk-python#8129 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
OpenAPI tools ignore operation- and path-level server overrides対応中かも @sanketpatil06 が 14 日前に担当しました。 オープンtools
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/adk-python#8064 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Two docstrings in openapi_tool document parameters the signatures do not accept対応中かも @surajksharma07 が 17 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
google/adk-python#8024 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
google/adk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vllm-project/vllm#70030 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TigreGotico/tugaphone#408 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
gke-labs/kube-agents#7308 ·
メンテナーはふだん 1 日以内に返信
-
t: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
chore
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
lugassawan/swe-workbench#841 ·