Skip to content

fix(google-common): serialize tool choice modes for Vertex AI - #11266

Open
Zexu Jin (jackjin1997) wants to merge 1 commit into
langchain-ai:mainfrom
jackjin1997:fix/google-function-calling-mode-11265
Open

fix(google-common): serialize tool choice modes for Vertex AI#11266
Zexu Jin (jackjin1997) wants to merge 1 commit into
langchain-ai:mainfrom
jackjin1997:fix/google-function-calling-mode-11265

Conversation

@jackjin1997

Copy link
Copy Markdown
Contributor

Summary

Fixes #11265

  • serialize user-facing auto, any, and none tool choices as the uppercase Vertex AI wire enums
  • use ANY for forced function names while preserving allowedFunctionNames
  • cover all modes with request-formatting tests and assert the live ChatVertexAI request payload in the existing integration test

Test plan

  • pnpm --filter @langchain/google-common test — 8 files, 298 tests passed; typecheck clean
  • pnpm --filter @langchain/google-common --filter @langchain/google-vertexai build — passed
  • pnpm exec oxfmt --check <changed files> — passed
  • pnpm exec oxlint <changed TypeScript files> — passed
  • live Vertex AI assertion added to the existing forced-tool integration test; not run locally because GCP credentials are unavailable

Reverse verification: the four focused request-formatting cases fail on current main with lowercase modes, then pass with this patch.

AI Disclosure

AI assisted with issue triage, test drafting, and implementation. The diff, reverse verification, and local checks were reviewed before submission.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f88f085

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@langchain/google-common Patch
@langchain/google-gauth Patch
@langchain/google-vertexai-web Patch
@langchain/google-vertexai Patch
@langchain/google-webauth Patch
@langchain/google-genai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant