Skip to content

applyGeminiToolSchemaSanitizer

applyGeminiToolSchemaSanitizer<T>(model): T

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/geminiSchemaSanitizer.ts:378

Wire the sanitizer into a ChatGoogle model at the tool-binding boundary. Overrides the instance’s bindTools so every tool passed to it — built-in, custom, or MCP, via createAgent/createDeepAgent which both call model.bindTools(tools) — is sanitized before it reaches @langchain/google’s Gemini converter. Provider-scoped: only the google-genai/vertexai presets call this, so no other provider’s tools are affected. Returns the same model instance for convenient chaining.

T extends BaseChatModel<BaseChatModelCallOptions, AIMessageChunk<MessageStructure<MessageToolSet>>>

T

T