threehymnsT
Convex Communityโ€ข3mo agoโ€ข
1 reply
threehymns

Gemini Search Grounding with Convex Agents

When passing google.tools.googleSearch({}) from @ai-sdk/google as a tool for the Convex agent component, I get this error:

[CONVEX A(chat:createThread)] Server Error
Uncaught Error: Field name $schema starts with a '$', which is reserved.
    at validateObjectField (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:163:11)
    at convexToJsonInternal (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:353:8)
    at convexToJsonInternal (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:353:8)
    at convexToJsonInternal (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:353:8)
    at <anonymous> (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:322:4)
    at map [as map] (<anonymous>)
    at convexToJsonInternal (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:320:29)
    at convexToJsonInternal (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:353:8)
    at <anonymous> (../node_modules/.pnpm/convex@1.27.5_@clerk+clerk-react@5.42.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/src/values/value.ts:322:4)
    at map [as map] (<anonymous>)

Other custom tools created with Convex's createTool work fine.
I'm on Vite and Tanstack start.
Was this page helpful?