fastmcp/tests/client
Bill Easton 671eaf0f03
fix: strip title fields from tool schemas for Gemini 2.5 Flash compatibility (#3861)
* fix: strip title fields from tool schemas for Gemini compatibility

Gemini 2.5 Flash produces MALFORMED_FUNCTION_CALL when a function
declaration's parameters_json_schema contains 'title' fields (which
Pydantic adds by default). Strip them in _convert_tool_to_google_genai
before passing to the API.

Fixes #3860

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix ty errors and lowest-deps test failure

- Add assertions for non-None before subscripting FunctionDeclaration
  fields (ty check)
- Test compress_schema directly instead of constructing FunctionDeclaration
  which may not support parameters_json_schema in google-genai==1.18.0

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 12:51:49 -04:00
..
auth fix: store absolute token expiry to prevent stale expires_in on reload (#3572) 2026-03-21 12:12:50 -04:00
client Harden client tool result error handling (#3778) 2026-04-08 13:57:10 -04:00
sampling fix: strip title fields from tool schemas for Gemini 2.5 Flash compatibility (#3861) 2026-04-12 12:51:49 -04:00
tasks Expose minimum_check_interval, reduce task pickup latency (#3500) 2026-03-14 16:08:28 -04:00
telemetry Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
transports fix: bump ty to >=0.0.29 and suppress new false positives (#3790) 2026-04-07 19:49:09 -04:00
__init__.py clean up test inits 2025-05-31 19:32:08 -04:00
test_elicitation.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_elicitation_enums.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_logs.py Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
test_notifications.py Remove sync notification infrastructure 2026-01-18 17:31:11 -05:00
test_oauth_callback_race.py Guard OAuth callback result from post-completion overwrites (#3417) 2026-03-07 11:41:00 -05:00
test_oauth_callback_xss.py Escape all HTML to prevent XSS attack (#2090) 2025-10-14 12:30:21 -07:00
test_openapi.py Move OpenAPI to providers/openapi submodule (#2672) 2025-12-22 11:13:33 -05:00
test_progress.py Guard default progress handler against zero totals (#3432) 2026-03-07 11:41:11 -05:00
test_roots.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
test_sampling.py Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_sampling_result_types.py Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_sampling_tool_loop.py Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_sse.py Bump tool sleep to actually validate timeout precedence 2026-03-02 13:50:29 -05:00
test_stdio.py fix: recover StdioTransport after subprocess exits (#3630) 2026-03-26 22:16:54 -04:00
test_streamable_http.py Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00