Repository navigation
fix(google): support GOOGLE_CLOUD_PROJECT_ID for Vertex AI - #101035
zhangguiping-xydt wants to merge 3 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 12:54 PM ET / 16:54 UTC. Summary PR surface: Source +8, Tests +224. Total +232 across 11 files. Reproducibility: yes. Current main omits Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the focused alias after maintainer acceptance of the additive Google Vertex env contract, keeping existing project precedence and the current regression coverage. Do we have a high-confidence way to reproduce the issue? Yes. Current main omits Is this the best way to solve the issue? Yes, for the code shape. The PR updates the bundled resolver, auth evidence, provider metadata, AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f92ed16e605e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +8, Tests +224. Total +232 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (6 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
cf42b46 to
094e0de
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Thanks for the contribution. I’m closing this for now because it adds a new Google Vertex auth/environment alias without maintainer-confirmed product direction. Current |
What Problem This Solves
Fixes an issue where Google Vertex AI users who configure their project with only
GOOGLE_CLOUD_PROJECT_IDwould have Vertex project detection treat the project as missing, even though the Google OAuth path already accepts that env name.Why This Change Was Made
This aligns the Vertex runtime project resolver, ADC credential-marker eligibility, pre-runtime auth evidence, operator-facing provider env metadata, and the published
@openclaw/aibuilt-in Vertex surface with the existing Google OAuth project env support. Without updating the auth evidence contract,GOOGLE_CLOUD_PROJECT_ID-only ADC setups could still be classified as unauthenticated before the Vertex transport path runs.The change keeps the existing env behavior intact for
GOOGLE_CLOUD_PROJECT,GCLOUD_PROJECT, and explicit project options, and does not change credential formats, config schema, migrations, provider selection, or default model routing.User Impact
Operators can use
GOOGLE_CLOUD_PROJECT_IDfor Google Vertex AI without duplicating the same value intoGOOGLE_CLOUD_PROJECTorGCLOUD_PROJECT. Existing Vertex setups using the older env names continue to work.Evidence
Real Google Vertex ADC proof from an OpenClaw bundled Google Vertex transport run using only
GOOGLE_CLOUD_PROJECT_IDfor the project env.GOOGLE_CLOUD_PROJECT,GCLOUD_PROJECT, andGOOGLE_APPLICATION_CREDENTIALSwere unset; local ADC credentials were used from the standard gcloud ADC location. The request reached the project-scoped VertexstreamGenerateContentendpoint, and Vertex returnedPERMISSION_DENIEDonly because billing is disabled on the proof project.Regression proof before the fix:
node scripts/run-vitest.mjs run extensions/google/transport-stream.test.tsfailed the newGOOGLE_CLOUD_PROJECT_IDVertex transport case because no guarded Vertex request was emitted.node scripts/run-vitest.mjs run extensions/google/index.test.tsfailed the new ADC marker case withexpected undefined to be 'gcp-vertex-credentials'.node scripts/run-vitest.mjs run src/agents/model-auth.profiles.test.tsfailed the new auth discovery case withexpected undefined to be 'gcp-vertex-credentials'.node scripts/run-vitest.mjs run src/llm/env-api-keys.test.tsfailed the new published@openclaw/aienv helper case withexpected undefined to be '<authenticated>'.node scripts/run-vitest.mjs run packages/ai/src/providers/google-vertex.test.tsfailed the new published@openclaw/aiprovider adapter case withexpected 'error' to be 'stop'.node scripts/run-vitest.mjs run extensions/google/transport-stream.test.tsnode scripts/run-vitest.mjs run src/agents/model-auth.profiles.test.tsnode scripts/run-vitest.mjs run extensions/googlenode scripts/run-vitest.mjs run src/llm/env-api-keys.test.tsnode scripts/run-vitest.mjs run packages/ai/src/providers/google-vertex.test.tsenv OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm check:changedThe default
pnpm check:changedpath attempted to delegate to Crabbox, but the local Crabbox binary failed its self-check before running project checks; the local remote-child mode above ran the changed lanes directly.CI red follow-up attribution:
check-additional-boundaries-bcdjob reportedextensions/google/transport-stream.test.ts: Use a documented openclaw/plugin-sdk test subpath instead of repo-only test helper bridges.build-artifactsthroughtest/extension-test-boundary.test.ts.openclaw/plugin-sdk/test-envfor the temp-dir helper instead of importing from../../test/helpers/temp-dir.js.node --import tsx scripts/check-no-extension-test-core-imports.tsnode scripts/run-vitest.mjs run test/extension-test-boundary.test.ts