-
Notifications
You must be signed in to change notification settings - Fork 741
Open
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is this a client library issue or a product issue? We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.
If the support paths suggested above still do not result in a resolution, please provide the following details.
================================================= short test summary info ==================================================
FAILED google/genai/tests/types/test_types.py::test_generic_alias_complex_array_with_default_value - AssertionError: assert FunctionDeclaration(\n description='test generic alias complex array with default value.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n default=[\n 1,\n 'a',\n 1.1,\n True,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ]\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'b': Schema(\n default=[\n 11,\n 'aa',\n 1.11,\n False,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ]\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'c': Schema(\n default=[\n [\n 1,\n ],\n 2,\n ],\n items=Schema(\n any_of=[\n Schema(\n items=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ]\n ),\n type=<Type.ARRAY: 'ARRAY'>\n )\n },\n required=[],\n type=<Type.OBJECT: 'OBJECT'>\n )\n) == FunctionDeclaration(\n description='test generic alias complex array with default value.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n default=[\n 1,\n 'a',\n 1.1,\n True,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'b': Schema(\n default=[\n 11,\n 'aa',\n 1.11,\n False,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'c': Schema(\n default=[\n [\n 1,\n ],\n 2,\n ],\n items=Schema(\n any_of=[\n Schema(\n items=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n )\n },\n required=[],\n type=<Type.OBJECT: 'OBJECT'>\n )\n)
Full diff:
FunctionDeclaration(
description='test generic alias complex array with default value.',
name='func_under_test',
parameters=Schema(
properties={
'a': Schema(
default=[
1,
'a',
1.1,
True,
],
items=Schema(
any_of=[
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
type=<Type.ARRAY: 'ARRAY'>
),
'b': Schema(
default=[
11,
'aa',
1.11,
False,
],
items=Schema(
any_of=[
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
type=<Type.ARRAY: 'ARRAY'>
),
'c': Schema(
default=[
[
1,
],
2,
],
items=Schema(
any_of=[
Schema(
items=<... Max depth ...>,
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
type=<Type.ARRAY: 'ARRAY'>
)
},
required=[],
type=<Type.OBJECT: 'OBJECT'>
)
)
FAILED google/genai/tests/types/test_types.py::test_generic_alias_complex_array_with_default_value_all_py_versions - AssertionError: assert FunctionDeclaration(\n description='test generic alias complex array with default value.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n default=[\n 1,\n 'a',\n 1.1,\n True,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ]\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'b': Schema(\n default=[\n 11,\n 'aa',\n 1.11,\n False,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ]\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'c': Schema(\n default=[\n [\n 1,\n ],\n 2,\n ],\n items=Schema(\n any_of=[\n Schema(\n items=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ]\n ),\n type=<Type.ARRAY: 'ARRAY'>\n )\n },\n required=[],\n type=<Type.OBJECT: 'OBJECT'>\n )\n) == FunctionDeclaration(\n description='test generic alias complex array with default value.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n default=[\n 1,\n 'a',\n 1.1,\n True,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'b': Schema(\n default=[\n 11,\n 'aa',\n 1.11,\n False,\n ],\n items=Schema(\n any_of=[\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n 'c': Schema(\n default=[\n [\n 1,\n ],\n 2,\n ],\n items=Schema(\n any_of=[\n Schema(\n items=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n Schema(\n type=<... Max depth ...>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n )\n },\n required=[],\n type=<Type.OBJECT: 'OBJECT'>\n )\n)
Full diff:
FunctionDeclaration(
description='test generic alias complex array with default value.',
name='func_under_test',
parameters=Schema(
properties={
'a': Schema(
default=[
1,
'a',
1.1,
True,
],
items=Schema(
any_of=[
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
type=<Type.ARRAY: 'ARRAY'>
),
'b': Schema(
default=[
11,
'aa',
1.11,
False,
],
items=Schema(
any_of=[
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
type=<Type.ARRAY: 'ARRAY'>
),
'c': Schema(
default=[
[
1,
],
2,
],
items=Schema(
any_of=[
Schema(
items=<... Max depth ...>,
type=<... Max depth ...>
),
Schema(
type=<... Max depth ...>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
type=<Type.ARRAY: 'ARRAY'>
)
},
required=[],
type=<Type.OBJECT: 'OBJECT'>
)
)
FAILED google/genai/tests/types/test_types.py::test_pydantic_model_in_union_type - AssertionError: assert FunctionDeclaration(\n description='test pydantic model in union type.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'animal': Schema(\n any_of=[\n Schema(\n properties={<... 3 items at Max depth ...>},\n required=[<... 3 items at Max depth ...>],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n Schema(\n properties={<... 3 items at Max depth ...>},\n required=[<... 3 items at Max depth ...>],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ]\n )\n },\n required=[\n 'animal',\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n) == FunctionDeclaration(\n description='test pydantic model in union type.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'animal': Schema(\n any_of=[\n Schema(\n properties={<... 3 items at Max depth ...>},\n required=[<... 3 items at Max depth ...>],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n Schema(\n properties={<... 3 items at Max depth ...>},\n required=[<... 3 items at Max depth ...>],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n },\n required=[\n 'animal',\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n)
Full diff:
FunctionDeclaration(
description='test pydantic model in union type.',
name='func_under_test',
parameters=Schema(
properties={
'animal': Schema(
any_of=[
Schema(
properties={<... 3 items at Max depth ...>},
required=[<... 3 items at Max depth ...>],
type=<Type.OBJECT: 'OBJECT'>
),
Schema(
properties={<... 3 items at Max depth ...>},
required=[<... 3 items at Max depth ...>],
type=<Type.OBJECT: 'OBJECT'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
)
},
required=[
'animal',
],
type=<Type.OBJECT: 'OBJECT'>
)
)
FAILED google/genai/tests/types/test_types.py::test_type_union - AssertionError: assert FunctionDeclaration(\n description='test type union.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n any_of=[\n Schema(\n type=<Type.INTEGER: 'INTEGER'>\n ),\n Schema(\n type=<Type.STRING: 'STRING'>\n ),\n ]\n ),\n 'b': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ]\n ),\n 'c': Schema(\n any_of=[\n Schema(\n items=Schema(\n any_of=<... Max depth ...>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ]\n ),\n 'd': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ]\n )\n },\n required=[\n 'a',\n 'b',\n 'c',\n 'd',\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n) == FunctionDeclaration(\n description='test type union.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n any_of=[\n Schema(\n type=<Type.INTEGER: 'INTEGER'>\n ),\n Schema(\n type=<Type.STRING: 'STRING'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'b': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'c': Schema(\n any_of=[\n Schema(\n items=Schema(\n any_of=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'd': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n },\n required=[\n 'a',\n 'b',\n 'c',\n 'd',\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n)
Full diff:
FunctionDeclaration(
description='test type union.',
name='func_under_test',
parameters=Schema(
properties={
'a': Schema(
any_of=[
Schema(
type=<Type.INTEGER: 'INTEGER'>
),
Schema(
type=<Type.STRING: 'STRING'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
'b': Schema(
any_of=[
Schema(
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
'c': Schema(
any_of=[
Schema(
items=Schema(
- any_of=<... Max depth ...>,
? -
+ any_of=<... Max depth ...>
- type=<... Max depth ...>
),
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
'd': Schema(
any_of=[
Schema(
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
)
},
required=[
'a',
'b',
'c',
'd',
],
type=<Type.OBJECT: 'OBJECT'>
)
)
FAILED google/genai/tests/types/test_types.py::test_type_union_all_py_versions - AssertionError: assert FunctionDeclaration(\n description='test type union.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n any_of=[\n Schema(\n type=<Type.INTEGER: 'INTEGER'>\n ),\n Schema(\n type=<Type.STRING: 'STRING'>\n ),\n ]\n ),\n 'b': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ]\n ),\n 'c': Schema(\n any_of=[\n Schema(\n items=Schema(\n any_of=<... Max depth ...>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ]\n )\n },\n required=[\n 'a',\n 'b',\n 'c',\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n) == FunctionDeclaration(\n description='test type union.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n any_of=[\n Schema(\n type=<Type.INTEGER: 'INTEGER'>\n ),\n Schema(\n type=<Type.STRING: 'STRING'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'b': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'c': Schema(\n any_of=[\n Schema(\n items=Schema(\n any_of=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n },\n required=[\n 'a',\n 'b',\n 'c',\n ],\n type=<Type.OBJECT: 'OBJECT'>\n )\n)
Full diff:
FunctionDeclaration(
description='test type union.',
name='func_under_test',
parameters=Schema(
properties={
'a': Schema(
any_of=[
Schema(
type=<Type.INTEGER: 'INTEGER'>
),
Schema(
type=<Type.STRING: 'STRING'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
'b': Schema(
any_of=[
Schema(
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
'c': Schema(
any_of=[
Schema(
items=Schema(
- any_of=<... Max depth ...>,
? -
+ any_of=<... Max depth ...>
- type=<... Max depth ...>
),
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
)
},
required=[
'a',
'b',
'c',
],
type=<Type.OBJECT: 'OBJECT'>
)
)
FAILED google/genai/tests/types/test_types.py::test_type_union_with_default_value_all_py_versions - AssertionError: assert FunctionDeclaration(\n description='test type union with default value.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n any_of=[\n Schema(\n type=<Type.INTEGER: 'INTEGER'>\n ),\n Schema(\n type=<Type.STRING: 'STRING'>\n ),\n ],\n default=1\n ),\n 'b': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n default=[\n 1,\n ]\n ),\n 'c': Schema(\n any_of=[\n Schema(\n items=Schema(\n any_of=<... Max depth ...>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n default={}\n )\n },\n required=[],\n type=<Type.OBJECT: 'OBJECT'>\n )\n) == FunctionDeclaration(\n description='test type union with default value.',\n name='func_under_test',\n parameters=Schema(\n properties={\n 'a': Schema(\n any_of=[\n Schema(\n type=<Type.INTEGER: 'INTEGER'>\n ),\n Schema(\n type=<Type.STRING: 'STRING'>\n ),\n ],\n default=1,\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'b': Schema(\n any_of=[\n Schema(\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n default=[\n 1,\n ],\n type=<Type.OBJECT: 'OBJECT'>\n ),\n 'c': Schema(\n any_of=[\n Schema(\n items=Schema(\n any_of=<... Max depth ...>,\n type=<... Max depth ...>\n ),\n type=<Type.ARRAY: 'ARRAY'>\n ),\n Schema(\n type=<Type.OBJECT: 'OBJECT'>\n ),\n ],\n default={},\n type=<Type.OBJECT: 'OBJECT'>\n )\n },\n required=[],\n type=<Type.OBJECT: 'OBJECT'>\n )\n)
Full diff:
FunctionDeclaration(
description='test type union with default value.',
name='func_under_test',
parameters=Schema(
properties={
'a': Schema(
any_of=[
Schema(
type=<Type.INTEGER: 'INTEGER'>
),
Schema(
type=<Type.STRING: 'STRING'>
),
],
- default=1,
? -
+ default=1
- type=<Type.OBJECT: 'OBJECT'>
),
'b': Schema(
any_of=[
Schema(
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
],
default=[
1,
- ],
? -
+ ]
- type=<Type.OBJECT: 'OBJECT'>
),
'c': Schema(
any_of=[
Schema(
items=Schema(
- any_of=<... Max depth ...>,
? -
+ any_of=<... Max depth ...>
- type=<... Max depth ...>
),
type=<Type.ARRAY: 'ARRAY'>
),
Schema(
type=<Type.OBJECT: 'OBJECT'>
),
],
- default={},
? -
+ default={}
- type=<Type.OBJECT: 'OBJECT'>
)
},
required=[],
type=<Type.OBJECT: 'OBJECT'>
)
)
Environment details
- Programming language: Python
- OS: Arch Linux
- Language runtime version: 3.14
- Package version: 1.59.0
Steps to reproduce
- ?
- ?
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.