Repository navigation
fix(google): rename Python-keyword tool parameter names for Gemini function calling - #143178
HighervGround wants to merge 20 commits into
Conversation
Record the 31 channel schema entries introduced by the existing Buzz multiaccount support in c3ff7f9. Core and plugin config surfaces remain unchanged.
Regenerate the documentation baseline for the requested latest-main cut. Main PR openclaw#118674 accepts already-declared model compatibility fields, adding 44 core schema paths; the generated core count is now 2407. Channel and plugin counts stay unchanged. This commit adds no runtime or schema behavior.
Revalidate the admitted reply lifecycle and durable restart handoff at the session write boundary. A recovered execution may reuse the original run ID, so queued cleanup must not retire its successor delivery route.
Carry the claimed writer into final persistence even when a native harness supplies no context subscription events. Distinguish absent telemetry from explicitly unknown context, preserve stale usage honestly, and verify cancellation and fallback accounting.
Retain one admission across fallback candidates, seed canonical durable session records, and return the actual session identity from mocked attempts. Drain preparation failures before restoring shared filesystem spies.
Restore stable envelope, provider-catalog, and thinking-catalog SDK names while preserving canonical internal owners. Cover old consumer callbacks and errors, and document retained helper contracts. Remove an unverified unshipped realtime catalog alias and align fixtures and examples with the retained stable default.
…nction calling Gemini's function calling appears to render tool signatures internally as Python `def name(param, ...)` declarations. A JSON Schema property named after a Python hard keyword (e.g. "in", "from") produces an invalid signature, and the model abandons structured function calling for the entire turn, emitting a malformed print(default_api.tool(...)) text call instead of a real functionCall part - for every tool in the request, not only the one with the offending property. Confirmed by bisecting a live Vertex AI gemini-2.5-flash request (35 declared tools, drawn from OpenClaw's own "coding" tool profile) down to a single "in" property on the built-in `automations` tool; removing or renaming just that property fixed the entire turn. The built-in `memory_get` tool has the same issue with a "from" property. Reversibly rename any Python hard-keyword property name (properties + the required array) to `name__oc_kw` before the schema reaches Gemini, and rename it back when the model's function-call arguments come back, so the actual tool implementation never sees the rename. Scoped to Google's shared convertGoogleTools/functionCall parsing, so it covers both google-generative-ai and google-vertex.
|
🦞👀 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. |
There was a problem hiding this comment.
🟡 Changes recommended
There are correctness issues in the new Gemini arg “unsanitization” logic and an Android approval SHA source mismatch risk that should be resolved before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR primarily addresses a Gemini/Vertex AI tool-calling failure mode by sanitizing Python-hard-keyword JSON Schema parameter names at the Google transport boundary, and then restoring original names in returned function-call arguments. It also includes several additional updates across release tooling/workflows, Plugin SDK compatibility surfaces, and session/compaction accounting.
Changes:
- Add reversible Python-hard-keyword parameter renaming (
in→in__oc_kw, etc.) for Gemini tool declarations and reverse-map incoming function-call args. - Update release tooling to a v2 Android approval/identity contract and adjust release publish behavior so Android publication is dispatched without blocking core publication.
- Refactor/extend various runtime and SDK compatibility seams (skills watcher path resolution on Windows, SDK export aliases, compaction accounting snapshot shape, and related tests/docs).
File summaries
| File | Description |
|---|---|
| ui/src/pages/config/talk.test.ts | Updates OpenAI GPT-Live model fixtures to prefer gpt-live-1-codex. |
| test/scripts/validate-release-publish-approval.test.ts | Adds workflow-parsing and extensive Android approval/identity tests (platform-gated). |
| test/scripts/test-projects.test.ts | Includes the new release-approval test in changed-target routing. |
| test/scripts/package-source-preflight.test.ts | Adds a regression test for oversized contribution records passing through packaging. |
| test/scripts/package-changelog.test.ts | Extends changelog packaging tests for compaction/linking and restore behavior. |
| test/scripts/package-acceptance-workflow.test.ts | Validates publish workflow no longer blocks core publication on Android completion. |
| test/scripts/ocm-npm-workspace-deps.test.ts | Ensures workspace dependency adapter includes new release-notes compaction helper. |
| test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts | Includes new compaction helper in Docker packaging file allowlist. |
| src/skills/runtime/refresh.ts | Uses a resolved watch path to improve watcher correctness (notably on Windows). |
| src/skills/runtime/refresh.test.ts | Adds Windows short-path expansion coverage while preserving existing watch-root behavior. |
| src/skills/runtime/refresh-watch-path.ts | New helper to expand Windows 8.3 segments without following symlinks. |
| src/plugin-sdk/provider-catalog-runtime.ts | Renames SDK export to resolvePluginProviders via alias for compatibility. |
| src/plugin-sdk/provider-catalog-runtime.test.ts | Adds a regression test for the shipped SDK provider-resolution export. |
| src/plugin-sdk/agent-runtime.ts | Restores/bridges a previously shipped callback parameter name at the SDK boundary. |
| src/plugin-sdk/agent-runtime-model-catalog-contract.test.ts | Tests the retained SDK callback contract and error propagation. |
| src/gateway/worker-environments/node-launch-adapter.ts | Adjusts deadline composition/precedence and uses throwIfAborted for cancellations. |
| src/gateway/worker-environments/node-launch-adapter.test.ts | Expands coverage for deadline identity across timer/clock/caller-cancel scenarios. |
| src/channels/inbound-event/envelope.ts | Renames callback parameter to resolveStorePath across inbound-envelope builders. |
| src/channels/inbound-event/envelope.test.ts | Verifies SDK callback naming is preserved through direct/routed/runtime helpers. |
| src/auto-reply/reply/restart-recovery-claim.ts | Tightens restart-recovery cleanup ownership checks using lifecycle generation. |
| src/auto-reply/reply/restart-recovery-claim.test.ts | Adds queued-cleanup interruption cases and user-abort retirement coverage. |
| src/auto-reply/reply/get-reply-native-slash-fast-path.ts | Switches to the core thinking-default resolver export. |
| src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts | Updates compaction accounting payload shape to currentContextSnapshot. |
| src/auto-reply/reply/agent-runner-result-accounting.ts | Reads context tokens via currentContextSnapshot when persisting compaction counts. |
| src/auto-reply/reply/agent-runner-result-accounting.persistence.test.ts | Updates persistence test fixtures for the new snapshot shape. |
| src/auto-reply/reply/agent-runner-memory.ts | Updates compaction accounting plumbing to use currentContextSnapshot. |
| src/auto-reply/reply/agent-runner-memory.test.ts | Extends tests for fallback flows with/without observed context snapshots. |
| src/auto-reply/reply/agent-runner-execution-lifecycle.test.ts | Updates compaction-fact aggregation tests for the new snapshot semantics. |
| src/auto-reply/reply/agent-runner-execute.ts | Passes lifecycle generation into restart-recovery claim controller. |
| src/auto-reply/reply/agent-runner-compaction-accounting.ts | Ensures invalidation/aggregation preserves snapshot intent across facts. |
| src/agents/tools/session-status-tool.ts | Switches to the core thinking-default resolver export. |
| src/agents/tools/image-tool.providers.live.test.ts | Avoids plugin discovery cold-start in live probe to stay within test budgets. |
| src/agents/subagents/announce/subagent-announce-direct-delivery.ts | Tweaks visible-final delivery detection for session-only requesters. |
| src/agents/subagents/announce/subagent-announce-delivery.test.ts | Adds coverage for yielded requesters and external vs local delivery differences. |
| src/agents/model-thinking-default.ts | Renames the runtime-catalog thinking resolver to a *Core export. |
| src/agents/model-selection.ts | Re-exports the renamed resolveThinkingDefaultWithRuntimeCatalogCore. |
| src/agents/model-fallback.run-embedded.e2e.test.ts | Updates admission harness wiring and defers routing-fixture imports. |
| src/agents/embedded-agent-runner/run/run-settlement.ts | Refactors compaction fact creation to better represent “writer-only” snapshots. |
| src/agents/embedded-agent-runner/run/internal-params.ts | Changes compaction fact shape to currentContextSnapshot. |
| src/agents/embedded-agent-runner/run.recovery-cancellation.test-support.ts | Extends ordering cases and covers “opaque native” usage-without-subscription. |
| src/agents/embedded-agent-runner.run-embedded-agent.fault-sequences.e2e.test.ts | Reworks scenario setup to use prepared admissions and closes leases reliably. |
| src/agents/embedded-agent-runner.run-embedded-agent.auth-profile-rotation.e2e.test.ts | Updates E2E wrapper to the prepared-admission harness. |
| src/agents/command/session-store.ts | Adjusts total-token persistence logic to use snapshot (when present) and mark staleness otherwise. |
| src/agents/command/session-store.test.ts | Updates tests for new snapshot behavior and staleness semantics (including zero). |
| src/agents/command/compaction-accounting.ts | Preserves snapshot semantics across candidates and persists tokens via snapshot. |
| src/agents/agent-command.embedded-maintenance.test.ts | Updates retry-context tests for snapshot-observed vs usage-derived totals. |
| src/agents/agent-command.compaction-rotation.test.ts | Updates helpers/fixtures for the currentContextSnapshot shape. |
| src/agents/admitted-run-context.test-support.ts | Updates prepared-admission wrapper to import the real boundary and close it. |
| scripts/validate-release-publish-approval.mjs | Adds v2 Android receipt validation and live tooling identity / parent-run checks. |
| scripts/render-github-release-notes.mts | Moves compaction/linking logic into a shared helper module. |
| scripts/package-changelog.mjs | Adds compaction path for oversized contribution records while preserving editorial notes. |
| scripts/lib/release-notes-compaction.mjs | New shared helper for “complete contribution record” compaction and link rendering. |
| scripts/control-ui-mock-dev.ts | Removes deprecated GPT-Live model option from Control UI mock scenario. |
| extensions/telegram/src/bot-native-command-builtins.ts | Updates call site to use retained SDK callback name (loadModelCatalog). |
| extensions/openai/realtime-quicksilver.ts | Curates GPT-Live model list down to gpt-live-1-codex. |
| extensions/openai/realtime-quicksilver.test.ts | Updates supported-model detection test cases accordingly. |
| extensions/openai/realtime-quicksilver-gateway-bridge.live.test.ts | Updates live bridge test to use gpt-live-1-codex. |
| extensions/google/transport-stream.ts | Adds schema-key sanitization for Gemini tool declarations and reverse-mapping of args. |
| extensions/google/transport-stream.test.ts | Adds unit tests for outgoing rename, non-rename control, and incoming restore. |
| docs/reference/RELEASING.md | Updates release process docs for changelog compaction and non-blocking Android publication. |
| docs/providers/openai.md | Removes docs references to deprecated GPT-Live model option. |
| docs/plugins/sdk-migration.md | Documents retained helper contracts/names at the SDK boundary. |
| docs/nodes/talk.md | Updates Talk docs to only recommend gpt-live-1-codex. |
| docs/.generated/config-baseline.sha256 | Updates generated baseline hashes after config/doc changes. |
| docs/.generated/config-baseline.counts.json | Updates generated baseline counts after config/doc changes. |
| .github/workflows/openclaw-release-publish.yml | Adds v2 Android approval fields; dispatches Android without awaiting completion; updates summaries. |
| .github/workflows/android-release.yml | Updates Android workflow inputs/verification to v2 approval + tooling identity checks. |
Review details
- Files reviewed: 67/68 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| RELEASE_PUBLISH_BRANCH: ${{ github.ref_name }} | ||
| RELEASE_PUBLISH_FULL_REF: ${{ github.ref }} | ||
| RELEASE_PUBLISH_WORKFLOW_SHA: ${{ github.workflow_sha }} | ||
| RELEASE_PUBLISH_RUN_ATTEMPT: ${{ github.run_attempt }} |
| for (const [key, value] of Object.entries(args as Record<string, unknown>)) { | ||
| const restoredKey = key.endsWith(PYTHON_KEYWORD_RENAME_SUFFIX) | ||
| ? key.slice(0, -PYTHON_KEYWORD_RENAME_SUFFIX.length) | ||
| : key; | ||
| result[restoredKey] = unsanitizeGooglePythonKeywordArgs(value); | ||
| } | ||
| return result; |
| RELEASE_TAG: "v2026.8.1", | ||
| RELEASE_TARGET_SHA: "a".repeat(40), | ||
| TARGET_SHA: "a".repeat(40), |
|
Codex review: blocked before merge. Reviewed October 4, 2026, 8:35 AM ET / 12:35 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch renames Python-keyword tool parameters for Gemini, restores returned argument names, adds regression tests, and includes earlier release, SDK, and session-accounting changes. Merge readiness⛔ Blocked before merge - 6 items remain This PR still addresses an unfixed Gemini tool-calling problem and has useful live Vertex evidence. Both previously reported correctness findings remain unresolved at the unchanged head; neither related merged PR implements the keyword mapping. Priority: P1 Review scores
Verification
How this fits togetherThe Google provider converts OpenClaw tool schemas and conversation history into Gemini requests, then converts returned function calls into executable tool arguments. Those calls also return to Gemini as history on subsequent turns. flowchart LR
A[Tool schemas] --> C[Google request conversion]
B[Conversation history] --> C
C --> D[Gemini API]
D --> E[Function call decoding]
E --> F[Tool execution]
E --> B
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +181, Tests +1073, Docs +102, Config 0, Generated 0, Other +62. Total +1418 across 68 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Reuse existing schema traversal and the shared Google projector/reducer for one collision-safe, schema-scoped mapping across declarations, returned calls, and replay, preserving internal names and untouched data. Do we have a high-confidence way to reproduce the issue? Yes for the patch defects: source deterministically shows suffix-key corruption, schema collisions, and mismatched replay names. The original Vertex failure has contributor live evidence, but was not independently rerun on current main. Is this the best way to solve the issue? No, the current patch is incomplete. A provider-boundary mapping is appropriate, but it must be collision-safe, schema-aware, replay-consistent, and integrated into current main's shared Google owners; renaming public tool parameters would unnecessarily affect other providers. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e4f89eb03acc. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Supersedes #143178, thanks @HighervGround. Related: #143176 ## What Problem This Solves Fixes Gemini tool calling when a declared parameter is a Python keyword such as `from`, `class`, or `lambda`. ## User Impact Google and Vertex tools retain their original parameter names at execution. Existing suffix names and nested user data remain intact. This replacement includes only the Google parameter repair. ## Why This Change Was Made A shared Google converter chooses unused underscore aliases for declared top-level keyword parameters, restores returned arguments, and reapplies the aliases during signed history replay. GenerateContent, Vertex, Interactions, and explicit prompt caches use the same mapping. Cached requests retain canonical schemas for decoding while omitting cached declarations from the outgoing request. The duplicate prompt-cache declaration builder is removed. Necessary production growth implements collision-safe schema-based mapping across the existing transports; there is no new cache, setting, persistence format, or dependency. ## Evidence - Current-main source check: `65a125adc598deff3ded853f155acfa616d39c0c` passes tool properties and returned arguments unchanged. The contributor's captured Vertex bisection reports `MALFORMED_FUNCTION_CALL` with `automations.in`, and a valid call after renaming that property. [Google's function-calling documentation](https://ai.google.dev/gemini-api/docs/function-calling) describes JSON Schema parameters but does not document a Python-keyword restriction. No live Gemini API calls were made. - Red before: on the unchanged main implementation, `packages/ai/src/providers/google-shared.test.ts` had exactly the two new failures (outgoing schema and inbound restoration), with 32 existing tests passing. [Crabbox run](https://github.com/openclaw/openclaw/actions/runs/41551852373). - Green after: 211 tests pass across the four changed behavioral suites (SDK/Interactions, prompt cache, managed Google/Vertex); the 14 prompt-prefix cases and the 28 message-conversion/lifecycle/request-config cases also pass. Touched-file type-aware lint (0 warnings/errors), format, and `git diff --check` pass. [Crabbox proof](https://github.com/openclaw/openclaw/actions/runs/41552191472). Final named-test invocation took 45.49 s plus setup; the managed transport file took 10.84 s wall time, with the cache suite dominated by existing compiled-worker setup. Exact-head [CI run 41555285820](https://github.com/openclaw/openclaw/actions/runs/41555285820) passed: 45 successful jobs, 28 skipped, 11 min 51 s wall time and 7,810 summed job-seconds. - CI repair proof: [the first CI run](https://github.com/openclaw/openclaw/actions/runs/41553763628) found an extension test importing a core helper and a declaration-only assertion helper accepting the SDK’s broader tool-list type. Both test-only defects are fixed; production code is unchanged. The boundary guard, managed Google/Vertex transport, and SDK regression file now pass all 167 cases in 57.71 s, with touched-file lint/format green. [Crabbox repair proof](https://github.com/openclaw/openclaw/actions/runs/41554614333). - Review: Local autoreview of the complete implementation diff against `65a125adc598deff3ded853f155acfa616d39c0c`, P0–P2, returned `scoped-clean`; no findings. A supplemental P0–P2 review of the CI fixture repairs against `6fe9bc666896375a6ae42fa5e2f925acbaae10f9` also returned `scoped-clean`. Simplification retained one schema/argument mapping owner and removed the duplicate cached declaration projection. - LOC: production +116/−19 (net +97), tests/support +342/−11 (net +331). The dedicated test-line allocation covers only these regressions: schema projection, execution, signed replay, managed/Vertex transport, Interactions argument deltas, and cached declarations. - The contributor branch was read through `gh` and was never checked out or run. Validation ran on our reimplementation in Blacksmith Testbox through Crabbox. Broad proof is PR CI. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: HighervGround <[email protected]>
|
Thanks @HighervGround for the report and the Vertex bisection. The focused fix is now merged in #191561, including collision-safe parameter aliases, argument restoration, and history replay. Closing this PR in favor of that credited replacement. |
…law#191561) Supersedes openclaw#143178, thanks @HighervGround. Related: openclaw#143176 ## What Problem This Solves Fixes Gemini tool calling when a declared parameter is a Python keyword such as `from`, `class`, or `lambda`. ## User Impact Google and Vertex tools retain their original parameter names at execution. Existing suffix names and nested user data remain intact. This replacement includes only the Google parameter repair. ## Why This Change Was Made A shared Google converter chooses unused underscore aliases for declared top-level keyword parameters, restores returned arguments, and reapplies the aliases during signed history replay. GenerateContent, Vertex, Interactions, and explicit prompt caches use the same mapping. Cached requests retain canonical schemas for decoding while omitting cached declarations from the outgoing request. The duplicate prompt-cache declaration builder is removed. Necessary production growth implements collision-safe schema-based mapping across the existing transports; there is no new cache, setting, persistence format, or dependency. ## Evidence - Current-main source check: `0aaff8f10c2ca6c998b75db5c1c820bf4a83971d` passes tool properties and returned arguments unchanged. The contributor's captured Vertex bisection reports `MALFORMED_FUNCTION_CALL` with `automations.in`, and a valid call after renaming that property. [Google's function-calling documentation](https://ai.google.dev/gemini-api/docs/function-calling) describes JSON Schema parameters but does not document a Python-keyword restriction. No live Gemini API calls were made. - Red before: on the unchanged main implementation, `packages/ai/src/providers/google-shared.test.ts` had exactly the two new failures (outgoing schema and inbound restoration), with 32 existing tests passing. [Crabbox run](https://github.com/openclaw/openclaw/actions/runs/41551852373). - Green after: 211 tests pass across the four changed behavioral suites (SDK/Interactions, prompt cache, managed Google/Vertex); the 14 prompt-prefix cases and the 28 message-conversion/lifecycle/request-config cases also pass. Touched-file type-aware lint (0 warnings/errors), format, and `git diff --check` pass. [Crabbox proof](https://github.com/openclaw/openclaw/actions/runs/41552191472). Final named-test invocation took 45.49 s plus setup; the managed transport file took 10.84 s wall time, with the cache suite dominated by existing compiled-worker setup. Exact-head [CI run 41555285820](https://github.com/openclaw/openclaw/actions/runs/41555285820) passed: 45 successful jobs, 28 skipped, 11 min 51 s wall time and 7,810 summed job-seconds. - CI repair proof: [the first CI run](https://github.com/openclaw/openclaw/actions/runs/41553763628) found an extension test importing a core helper and a declaration-only assertion helper accepting the SDK’s broader tool-list type. Both test-only defects are fixed; production code is unchanged. The boundary guard, managed Google/Vertex transport, and SDK regression file now pass all 167 cases in 57.71 s, with touched-file lint/format green. [Crabbox repair proof](https://github.com/openclaw/openclaw/actions/runs/41554614333). - Review: Local autoreview of the complete implementation diff against `0aaff8f10c2ca6c998b75db5c1c820bf4a83971d`, P0–P2, returned `scoped-clean`; no findings. A supplemental P0–P2 review of the CI fixture repairs against `6fe9bc666896375a6ae42fa5e2f925acbaae10f9` also returned `scoped-clean`. Simplification retained one schema/argument mapping owner and removed the duplicate cached declaration projection. - LOC: production +116/−19 (net +97), tests/support +342/−11 (net +331). The dedicated test-line allocation covers only these regressions: schema projection, execution, signed replay, managed/Vertex transport, Interactions argument deltas, and cached declarations. - The contributor branch was read through `gh` and was never checked out or run. Validation ran on our reimplementation in Blacksmith Testbox through Crabbox. Broad proof is PR CI. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: HighervGround <[email protected]>
Closes #143176
What Problem This Solves
Fixes an issue where users running
gemini-2.5-flashon Vertex AI with thecoding(orfull) tool profile would experience total tool-calling failure —MALFORMED_FUNCTION_CALL: print(default_api.<tool>(...))— whenever the built-inautomationsormemory_gettool was present in the declared tool list, even when calling a completely unrelated tool likeread.Why This Change Was Made
Gemini's function-calling implementation appears to render tool signatures internally as Python
def name(param, ...)declarations.automationshas aninparameter (for itsnext_checkaction) andmemory_gethas afromparameter — both Python hard keywords, both invalid as Python parameter names. When either is present anywhere in the declared tool list, the model abandons structured function calling for the entire turn rather than just failing on that one tool.The fix reversibly renames any JSON Schema property (and matching
requiredentry) named after a Python hard keyword toname__oc_kwbefore the tool declarations reach Gemini, and renames it back the moment a function-call response comes in — scoped toextensions/google/transport-stream.ts's sharedconvertGoogleTools(outgoing) and function-call-parsing (incoming) code, so it covers bothgoogle-generative-aiandgoogle-vertex. The actual tool implementation never sees the rename in either direction. Non-goal: this doesn't touch Python soft keywords (e.g.match), since those are valid Python parameter names and weren't part of the confirmed failure mode.User Impact
Tool calls to
read,write,web_search, or any other tool now succeed normally even whenautomationsormemory_getare also in the declared tool set. Previously this combination made tool-calling fail unconditionally on affected models/transports.Evidence
Bisected a live captured Vertex AI request (system instruction,
thinkingConfig, and all 35 function declarations from thecodingtool profile, replayed via directgenerateContentcalls) down to a singleinproperty onautomations:finishReasonMALFORMED_FUNCTION_CALLthinkingConfigMALFORMED_FUNCTION_CALLsystemInstructionMALFORMED_FUNCTION_CALLreadtool declared (drop other 34)STOP(correctfunctionCall)automations.inrenamed toin_STOP(correctfunctionCall)automations.inremovedSTOP(correctfunctionCall)Verified the shipped fix end-to-end against the real Vertex API through the actual CLI (
openclaw agent exec, fresh state dir each run):readtool call on a fresh session reliably failed withMALFORMED_FUNCTION_CALL: print(default_api.read(path='...'))whenautomations/memory_getwere in the tool list.readsucceeds with a correctly structured call;automationsitself, called withaction=next_check, in="30m", reaches the tool implementation as{"action":"next_check","in":"30m"}(confirming the reverse-mapping restores the original key), and fails only on its own legitimate business-logic check (next_check is only available to the currently running job) rather than a malformed call.Added two unit tests to
extensions/google/transport-stream.test.tscovering the outgoing rename (renames Python-keyword tool parameter names before sending to Gemini, plus aleaves non-keyword tool parameter names untouchedcontrol) and the incoming reverse-mapping (restores the original property name when the model echoes back a renamed Python-keyword argument), following the file's existingbuildGoogleGenerativeAiParams/buildSseResponse+runGeminiStreamResulttest patterns.I wasn't able to run the full
pnpm build && pnpm check && pnpm testlocally (sandboxed environment without pnpm/corepack and outside the repo's supported Node engine range) — relying on CI for the full suite, plus the live-API bisection and end-to-end CLI verification above for functional confidence.