Repository navigation
Commit 78ba1dc
committed
Google: Use parameters_json_schema for function declarations
Use parameters_json_schema instead of parameters (with schema_from_param
conversion) for FunctionDeclaration. This preserves the full JSON Schema
including anyOf types, which Gemini 3+ handles correctly but the Schema
format loses by converting to TYPE_UNSPECIFIED.
Also fix schema_from_param anyOf handling as fallback for response schemas:
pick the first non-null type instead of TYPE_UNSPECIFIED, which Gemini 3+
models reject.
See: google/adk-python#34241 parent eac4142 commit 78ba1dc
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
787 | 792 | | |
788 | 793 | | |
789 | 794 | | |
| |||
1221 | 1226 | | |
1222 | 1227 | | |
1223 | 1228 | | |
1224 | | - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
1225 | 1239 | | |
1226 | 1240 | | |
1227 | 1241 | | |
| |||
0 commit comments