Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot convert undefined or null to object at Function.keys at at toGeminiTool (/workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js #2214

Open
Gopinathp opened this issue Mar 2, 2025 · 0 comments
Labels
bug Something isn't working js

Comments

@Gopinathp
Copy link

Describe the bug
When running gemini models, I am getting the follow error.

Error processing AI message: TypeError: Cannot convert undefined or null to object\n at Function.keys ()\n at convertSchemaProperty (/workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js:533:12)\n at /workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js:534:31\n at Array.forEach ()\n at convertSchemaProperty (/workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js:533:38)\n at toGeminiTool (/workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js:330:17)\n at Array.map ()\n at /workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js:627:84\n at /workspace/node_modules/@genkit-ai/ai/lib/model.js:290:14\n at /workspace/node_modules/@genkit-ai/core/lib/action.js:204:62 {\n traceId: '54cd40ba57b57c6aa5dd334d7776af0a'\n}",

To Reproduce
I have migrated my project from 0.5 to .9 to 1.0.5; I am getting this error only when I use the gemini model. When I switch to any other model like openAI, there is no error.

** Node version
v18.12.1

Additional context
Working with other models from other community plugins.

@Gopinathp Gopinathp added bug Something isn't working js labels Mar 2, 2025
@Gopinathp Gopinathp changed the title [JS] TypeError: Cannot convert undefined or null to object at Function.keys at at toGeminiTool (/workspace/node_modules/@genkit-ai/vertexai/lib/gemini.js Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working js
Projects
Status: No status
Development

No branches or pull requests

1 participant