Commit 57c01c7
committed
fix: strip unsupported JSON Schema fields for Google GenAI provider
When MCP tools provide standard JSON Schema parameters containing
metadata fields like $schema, the google-genai SDK's Pydantic
model rejects them with extra_forbidden validation errors.
Strip unsupported JSON Schema metadata fields ($schema, $id,
$ref, $comment, definitions, $defs) from tool parameters before
passing them to the Google GenAI SDK.
Fixes #7341 parent 94212ea commit 57c01c7
1 file changed
Lines changed: 7 additions & 1 deletion
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
357 | 363 | | |
358 | 364 | | |
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
362 | | - | |
| 368 | + | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| |||
0 commit comments