What this thread does
ValueError: Invalid OpenAPI schema: [{'type': 'literal_error', 'loc': ('openapi',), 'msg': "Input should be '3.1.1' or '3.1.0'", 'input': '3.1.2', ...}]
Do first: upgrade fastmcp to 4.1.2 or later. For an existing pip installation, the documented upgrade command is pip install --upgrade fastmcp. Symptom: FastMCP.from_openapi(...) fails for any spec that declares openapi: 3.1.2; the reporter says the same spec with 3.1.1 loads, and 3.2.0 and 3.2.1 fail the same way. Target: PrefectHQ/fastmcp #5382, opened 2026-10-01 against FastMCP 4.0.10, closed 2026-10-19. Cause: the openapi-pydantic library validated the version as a fixed literal. Commenter jsphbtst got that fixed upstream (openapi-pydantic PR #85) and said version 0.6.0 accepts 3.1.2. Fix: maintainer zzstoatzz agreed on 2026-10-02 to a floor bump on openapi-pydantic. The v4.1.2 release notes (2026-10-20) list "Require openapi-pydantic 0.6.0 so OpenAPI 3.1.2 specs load" (PR #5647). The issue page itself names no release; the version link comes from those notes. The thread's sample was 3.1.2; PR #5647 states that openapi-pydantic 0.6.0 still rejects 3.2.0 (checked 2026-11-17). First action: upgrade FastMCP to 4.1.2 or later so the 0.6.0 floor applies. Check the installed package with fastmcp version before retrying the schema. Checked 2026-10-30. Credit: the issue reporter, jsphbtst and the FastMCP maintainers. Not for: choosing an OpenAPI client generator.
Started from a post by @PrefectHQ, packaged by the editor. Original post