mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Unknown name \"additionalProperties\" error with (probably) Google Gemini

Open SwastikGorai opened this issue 1 year ago • 2 comments

🐛 Describe the bug

litellm.llms.vertex_ai_and_google_ai_studio.common_utils.VertexAIError: {
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[0].parameters': Cannot find field.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "tools[0].function_declarations[0].parameters",
            "description": "Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[0].parameters': Cannot find field."
          }
        ]
      }
    ]
  }
}

The config file for my setup is:

{
    
    "graph_store": {
        "provider": "neo4j",
        "config" : {
            "url":  "url",
            "username": "uname",
            "password": "passwd"
        },
        "llm": {
            "provider": "litellm",
            "config": {
                "model": "gemini/gemini-1.5",
                "temperature": 0.2,
                "max_tokens": 1500,
            }
        }
    },
    
    "embedder": {
        "provider": "ollama",
        "config": {
            "model": "mxbai-embed-large",
            "embedding_dims": 1536
        }
    },
    
    "llm": {
        "provider": "litellm",
        "config": {
            "model": "gemini/gemini-1.5-flash",
            "temperature": 0.2,
            "max_tokens": 1500,
        }
    },
    
    "vector_store": {
        "provider": "qdrant",
        "config": {
            "embedding_model_dims": 1024
        }
    },
    
    "version": "v1.1"
}

  • But there seems that additionalProperties is present in tools[0].function_declarations[0].parameters
'tools': [{'function_declarations': [{'name': 'search', 'description': 'Search for nodes and relations in the graph.', 'parameters': {'type': 'object', 'properties': {'nodes': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of nodes to search for.'}, 'relations': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of relations to search for.'}}, 'required': ['nodes', 'relations'], 'additionalProperties': False}}]}]

Dependencies:

"langchain-community>=0.2.15", "langchain-google-genai>=1.0.10", "langchain-google-vertexai>=1.0.10", "litellm>=1.44.14", "mem0ai>=0.1.10", "ollama>=0.3.2", "rank-bm25>=0.2.2",

SwastikGorai avatar Sep 05 '24 11:09 SwastikGorai

I faced same issue , raised in #1942 cc : @prateekchhikara @Dev-Khant

Divyanshu9822 avatar Oct 09 '24 17:10 Divyanshu9822

same issue

benediktstroebl avatar Apr 07 '25 02:04 benediktstroebl

Closing this as it was resolved in the latest release you can also check with the beta.

parshvadaftari avatar Sep 23 '25 16:09 parshvadaftari