genai 0.7.0-beta.17

Multi-AI Providers Library for Rust. (OpenAI, Gemini, Anthropic, Ollama, AWS Bedrock, Vertex, Groq, DeepSeek, Kimi, GLM and many more)
Documentation
{
  "cases": [
    {
      "name": "pydantic_2_12_4_ordinary_tool",
      "generator": "pydantic 2.12.4",
      "raw_live_error": "additionalProperties is required to be supplied and to be false",
      "input": {
        "$defs": {
          "Child": {
            "properties": {
              "value": {
                "title": "Value",
                "type": "string"
              }
            },
            "required": [
              "value"
            ],
            "title": "Child",
            "type": "object"
          }
        },
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "child": {
            "$ref": "#/$defs/Child",
            "description": "A described referenced child"
          },
          "optional_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Optional Note"
          },
          "limit": {
            "default": 10,
            "title": "Limit",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "child"
        ],
        "title": "OrdinaryEnvelope",
        "type": "object"
      },
      "expected": {
        "$defs": {
          "Child": {
            "properties": {
              "value": {
                "title": "Value",
                "type": "string"
              }
            },
            "required": [
              "value"
            ],
            "title": "Child",
            "type": "object",
            "additionalProperties": false
          }
        },
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "child": {
            "properties": {
              "value": {
                "title": "Value",
                "type": "string"
              }
            },
            "required": [
              "value"
            ],
            "title": "Child",
            "type": "object",
            "description": "A described referenced child",
            "additionalProperties": false
          },
          "optional_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Optional Note"
          },
          "limit": {
            "default": 10,
            "title": "Limit",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "child",
          "optional_note",
          "limit"
        ],
        "title": "OrdinaryEnvelope",
        "type": "object",
        "additionalProperties": false
      }
    },
    {
      "name": "zod_3_25_76_ordinary_tool",
      "generator": "zod 3.25.76 + zod-to-json-schema 3.25.1",
      "raw_live_error": "required must include every key in properties; missing limit",
      "input": {
        "$ref": "#/definitions/OrdinaryEnvelope",
        "definitions": {
          "OrdinaryEnvelope": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "child": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false,
                "description": "A described referenced child"
              },
              "optionalNote": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "limit": {
                "type": "integer",
                "default": 10
              }
            },
            "required": [
              "name",
              "child"
            ],
            "additionalProperties": false
          }
        },
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "expected": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "child": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              }
            },
            "required": [
              "value"
            ],
            "additionalProperties": false,
            "description": "A described referenced child"
          },
          "optionalNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "type": "integer",
            "default": 10
          }
        },
        "required": [
          "name",
          "child",
          "optionalNote",
          "limit"
        ],
        "additionalProperties": false,
        "definitions": {
          "OrdinaryEnvelope": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "child": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false,
                "description": "A described referenced child"
              },
              "optionalNote": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "limit": {
                "type": "integer",
                "default": 10
              }
            },
            "required": [
              "name",
              "child",
              "optionalNote",
              "limit"
            ],
            "additionalProperties": false
          }
        },
        "$schema": "http://json-schema.org/draft-07/schema#"
      }
    },
    {
      "name": "schemars_1_2_1_discriminated_union_tool",
      "generator": "schemars 1.2.1",
      "raw_live_error": "oneOf is not permitted",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "title": "UnionEnvelope",
        "type": "object",
        "properties": {
          "animal": {
            "$ref": "#/$defs/Animal"
          }
        },
        "required": [
          "animal"
        ],
        "$defs": {
          "Animal": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "lives": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "kind": {
                    "type": "string",
                    "const": "cat"
                  }
                },
                "required": [
                  "kind",
                  "lives"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "bark_code": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "kind": {
                    "type": "string",
                    "const": "dog"
                  }
                },
                "required": [
                  "kind",
                  "bark_code"
                ]
              }
            ]
          }
        }
      },
      "expected": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "title": "UnionEnvelope",
        "type": "object",
        "properties": {
          "animal": {
            "$ref": "#/$defs/Animal"
          }
        },
        "required": [
          "animal"
        ],
        "$defs": {
          "Animal": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "lives": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "kind": {
                    "type": "string",
                    "const": "cat"
                  }
                },
                "required": [
                  "lives",
                  "kind"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "bark_code": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "kind": {
                    "type": "string",
                    "const": "dog"
                  }
                },
                "required": [
                  "bark_code",
                  "kind"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false
      }
    }
  ]
}