Commit graph

23 commits

Author SHA1 Message Date
Jeremiah Lowin
d34f065417 Move OpenAI sampling handler out of experimental
- Move from fastmcp.experimental.sampling.handlers.openai to fastmcp.server.sampling.openai
- Update docs and tests to use new import path
- Remove experimental handlers directory
2025-12-09 15:07:13 -05:00
Jeremiah Lowin
b501f05794
Switch to new OpenAPI parser as default (#2513)
* Switch to new OpenAPI parser as default

Remove the legacy OpenAPI parser and make the experimental parser the
default. The experimental parser (introduced in 2.11) offers better
performance, improved compatibility, and a more maintainable architecture.

- Delete legacy parser (server/openapi.py, utilities/openapi.py)
- Move experimental parser to main locations
- Remove enable_new_openapi_parser feature flag
- Update documentation to remove experimental references

* Add deprecation stubs for experimental OpenAPI imports

* Add deprecated enable_new_openapi_parser setting and deprecation tests

* SDK docs

* REview comments

* Fix docstrings

* Update docstring

* Review comments

* Fix broken links
2025-12-01 20:29:18 -05:00
Jeremiah Lowin
6cc9559f84
Bump ty to ==0.0.1a25 (#2350)
* Bump ty to >=0.0.1a25 with type fixes

Follow-up to #2295. Updates ty and fixes compatibility issues with alpha 25, including:

- Updated ignore comment syntax (possibly-unbound-attribute → possibly-missing-attribute)
- Fixed async generator type handling with anext()
- Fixed type narrowing for timeout parameters
- Converted base_url assignments to AnyHttpUrl after string manipulation
- Added CallToolResult to return type annotations
- Removed redundant type casts
- Fixed test form data to use strings instead of bytes

ty alpha 25 has limitations with isinstance() narrowing on unions (see pyproject.toml for details), requiring some targeted type ignores.

* Pin ty to ==0.0.1a25

Alpha releases can have breaking changes, so pin to the tested version.
2025-11-02 20:02:45 -05:00
Jeremiah Lowin
19fbc8435e
delete ratio test (#2250) 2025-10-24 19:10:19 -04:00
claude[bot]
638111990d Mark test_github_api_schema_performance as integration test
This test makes external HTTP requests to GitHub and is subject to
network latency, causing CI timeouts. Marking it as an integration test
excludes it from default test runs while keeping it available for
explicit integration testing.

Co-authored-by: William Easton <strawgate@users.noreply.github.com>
2025-10-24 20:59:55 +00:00
Jeremiah Lowin
3321644ad3
Replace subprocess tests with in-process async servers (#2006)
* Use anyio as testing backend

* Remove asyncio markers

* Update streamable http tests

* Replace all subprocess tests

* Replace anyio task groups with asyncio context managers in tests

- Convert run_server_async from anyio task group pattern to asyncio.create_task with async context manager
- Remove task_group fixture from conftest
- Update all test fixtures to use async with run_server_async pattern
- Remove TaskGroup imports from all test files
- Tests now work with pytest-asyncio instead of pytest-anyio

* Update test_github_provider_integration.py
2025-10-19 10:47:54 -04:00
Jeremiah Lowin
b45499292f
Fix nullable enum validation in OpenAPI converter (#2093) 2025-10-15 06:30:30 -07:00
Jeremiah Lowin
59aabe2741
Fix experimental parser missing top-level response schemas (#2087) (#2092) 2025-10-14 15:31:30 -07:00
shlomo666
92b7e92e05
Fix: Preserve OpenAPI parameter descriptions in experimental parser (#1877) 2025-09-21 10:43:50 -04:00
Jeremiah Lowin
9643ad8e1e
Fix FastAPI list parameter parsing in experimental OpenAPI parser (#1834)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
2025-09-19 13:36:37 -04:00
Jeremiah Lowin
39dee1bdb3
feat(experimental/openapi): replace $ref in additionalProperties; add tests (#1735)
Co-authored-by: Hsiao, Cooper <cooper.hsiao@commscope.com>
Co-authored-by: Cooper <xcooper1030@gmail.com>
2025-09-19 13:35:45 -04:00
William Easton
fe4f31c2c7
Enable more type checking rules (#1775) 2025-09-07 11:11:44 -04:00
William Easton
d32a2b953e
Fallback to a Completions API when Sampling is not available (#1145) 2025-08-21 07:49:29 -04:00
Jeremiah Lowin
dd34846266
Optimize OpenAPI payload size by 46% (#1452)
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-11 17:31:54 -04:00
Jeremiah Lowin
f8f05ca395
Clean up complexity from PR #1426 (#1435) 2025-08-10 21:55:17 -04:00
Jeremiah Lowin
558c7d2a66
Fix OpenAPI transitive references and performance (#1372) (#1426) 2025-08-09 20:53:51 -04:00
633WHU
5fe3287cee
Fix OpenAPI allOf handling at requestBody top level (#1378) (#1425) 2025-08-09 11:52:31 -04:00
Jeremiah Lowin
ec09310593
Increase performance test threshold to 100ms (#1406) 2025-08-08 12:19:22 -04:00
Jeremiah Lowin
6125b1ebfc
Improve OpenAPI-to-JSONSchema conversion utilities (#1283) 2025-07-28 21:02:03 -04:00
Jeremiah Lowin
52a0fc078a
Fix nullable field handling in OpenAPI to JSON Schema conversion (#1279)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 20:31:23 -04:00
itaru2622
99f27da088
fix: experimental FastMCPOpenAPI server lost headers in request when __init__(client with headers) (#1254) 2025-07-25 11:04:41 -04:00
Jeremiah Lowin
d6bd800d88
Optimize OpenAPI parser performance with single-pass schema processing (#1214) 2025-07-21 21:29:56 -04:00
Jeremiah Lowin
4a38784194
Introduce experimental OpenAPI parser with improved performance and maintainability (#1209) 2025-07-21 16:17:36 -04:00