Repository navigation
feat(google): support Gemini Decision models - #197501
Conversation
Register a V2 Decision provider in the bundled google plugin for the Gemini Decisions API (POST /v1beta/decisions) and declare the typed-only gemini-decision-1 model. Boolean questions map to native noul with true/false descriptions; choice/score keep labels and rubric indices. Text, JSON and inline PNG/JPEG/WebP evidence are supported. Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Successful live discovery replaced every captured row for its provider, including typed-only manifest rows that discovery never lists. The Decision model then reached models.list through the configured-ref path as a synthetic chat row. Retain inference.chat=false rows across acquisition so they stay in the decision catalog only. Co-authored-by: obviyus <[email protected]>
… live flow Gemini requires non-empty instructions while OpenClaw makes them optional for choice/score rubrics. Ask the rubric itself when they are omitted. Co-authored-by: obviyus <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
…flow Co-authored-by: obviyus <[email protected]>
|
Codex review: needs maintainer review before merge. What this changesAdds Gemini Decision evaluations and preserves typed-only model metadata after live chat-model discovery. Example: Select google/gemini-decision-1 and evaluate a checkout-outage ticket.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds useful Gemini Decision support absent from current main, with no actionable defect found; the earlier conflict is resolved and exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe existing Decision runtime selects the model and prepares credentials; the Google plugin translates typed questions and evidence into guarded Gemini HTTPS requests and returns validated answers and usage. flowchart LR
A[Decision tool or plugin caller] --> B[Decision runtime]
B --> C[Prepared model and credentials]
C --> D[Google Decision adapter]
D --> E[Guarded Gemini HTTPS endpoint]
E --> F[Shared result validation]
F --> A
Technical reviewBest possible solution: Land the plugin-owned integration and shared typed-row retention fix once the normal exact-head checks pass. Do we have a high-confidence way to reproduce the issue? This is principally a feature addition; source inspection confirms current main lacks Google's Decision registration, and the body records a before/after reproduction of the associated catalog leak. Is this the best way to solve the issue? The implementation uses the existing Decision provider contract, Google transport policy, shared decoder, and catalog projection owner; the retained modules serve distinct responsibilities without a competing execution path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a14127f6814e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +389, Tests +502, Docs +28, Other +5. Total +924 across 18 files. Added test files: 3. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)Reviewed November 12, 2026, 1:54 AM ET / 06:54 UTC (Revision 4). |
Inline the single-use transport closure, gate on the declared decision protocol instead of a parallel ID set, fold the Gemini live test into the existing registered Decision live test, drop tests that only re-prove shared validation, and tighten the docs. Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Revocation applies to the next request (#197557); a race test for a request already in flight is speculative machinery the updated rules reject. This reverts commit 1f7ea1e. Co-authored-by: obviyus <[email protected]>
…cisions # Conflicts: # docs/concepts/decision-models.md
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Adapt #197501 (0182580) by Ayaan Zaidi. Keep typed-only catalog entries after discovery and register the decision adapter after its shared provider. Retain OpenAI coverage in the shared live suite. 53 focused tests pass; scoped types, lint, formatting and docs pass. Local all-extension typing remains blocked by missing Matrix SDK, and no live Google key is injected. Independent local review omitted by owner direction. Co-authored-by: obviyus <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
* feat(google): support Gemini Decision models Register a V2 Decision provider in the bundled google plugin for the Gemini Decisions API (POST /v1beta/decisions) and declare the typed-only gemini-decision-1 model. Boolean questions map to native noul with true/false descriptions; choice/score keep labels and rubric indices. Text, JSON and inline PNG/JPEG/WebP evidence are supported. Co-authored-by: obviyus <[email protected]> * feat(google): price Gemini Decision input tokens Co-authored-by: obviyus <[email protected]> * test(google): add Gemini Decision live coverage Co-authored-by: obviyus <[email protected]> * fix(models): keep typed-only rows after live chat discovery Successful live discovery replaced every captured row for its provider, including typed-only manifest rows that discovery never lists. The Decision model then reached models.list through the configured-ref path as a synthetic chat row. Retain inference.chat=false rows across acquisition so they stay in the decision catalog only. Co-authored-by: obviyus <[email protected]> * feat(google): default Gemini Decision instructions and add registered live flow Gemini requires non-empty instructions while OpenClaw makes them optional for choice/score rubrics. Ask the rubric itself when they are omitted. Co-authored-by: obviyus <[email protected]> * test(google): fold Gemini Decision live coverage into the registered flow Co-authored-by: obviyus <[email protected]> * refactor(google): simplify Gemini Decision provider Inline the single-use transport closure, gate on the declared decision protocol instead of a parallel ID set, fold the Gemini live test into the existing registered Decision live test, drop tests that only re-prove shared validation, and tighten the docs. Co-authored-by: obviyus <[email protected]> * test(google): prove revoked authority stops Gemini Decision dispatch Co-authored-by: obviyus <[email protected]> * test(google): drop in-flight revocation race test Revocation applies to the next request (openclaw#197557); a race test for a request already in flight is speculative machinery the updated rules reject. This reverts commit 1f7ea1e. Co-authored-by: obviyus <[email protected]> --------- Co-authored-by: obviyus <[email protected]>
What Problem This Solves
Google launched the Gemini Decisions API (
gemini-decision-1), and OpenClaw had no way to select it as a Decision model.User Impact
Operators can set
agents.defaults.decisionModel: "google/gemini-decision-1"(or pick it in the Decision picker) with an existing Gemini API key.decision_evaluate, pluginapi.runtime.decisions.evaluateand automatic Decision assistance then use Gemini Decision for Boolean, Choice and Score questions over text, JSON or one inline PNG/JPEG/WebP image. Usage is priced at Google's published $0.10 per million input tokens.This also fixes typed-only Decision models (from any provider) appearing as selectable chat models in
models.listafter successful live discovery of their provider.Why This Change Was Made
googleplugin registers a V2 Decision provider forPOST /v1beta/decisionsand declaresgemini-decision-1as a typed-only (chat: false) catalog row. The System One response decoder is reused; Gemini-specific mappings covertrue_description/false_descriptioncriteria,total_*_tokensusage, and the scorelegendcheck.decisionModelthen reappeared as a synthetic chat row. Typed-only rows are now retained across acquisition.Evidence
src/decisions/registered.live.test.ts(the existing OpenAI registered live test, now parameterized over OpenAI and Google) passes for Google: mixed Boolean/Choice/Score over text plus PNG, JPEG and WebP images through the registered plugin anddecision_evaluate. Output tokens are 0 and routing/incident answers are correct.legend,confidence, and 400invalid_requesterrors for bad keys, empty instructions, one-option choices and empty input.tools.profile: minimal+decision_evaluate):openclaw agent execwith a Gemini chat model invokeddecision_evaluate: incident 0.99, routetechnical, urgency 1.67.openclaw agentturn triaged three tickets with correct teams and cancel probabilities.models.liston a throwaway Gateway:gemini-decision-1. RemovingdecisionModeldropped it to 18.gemini-decision-1only underdecisionModels, and Google discoveryready.models-listgateway integration files. Typecheck passes for core, core tests and extension tests.Simplification pass (pr-simplify):
gemini-decisionsprotocol), a duplicate 222-line Google live test, a duplicate plugin-level live test, the V1-bridge assertion, and unit cases that only re-proved shared result validation. The reflected-credential case now actually reaches the credential guard.Known limits: