adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Swagger/OpenAPI Docs Fail to Load with google-adk >= 1.19.0 (Internal Server Error on /openapi.json)

Open acloudpotato opened this issue 1 year ago • 2 comments

Description of the Bug

Image

When using google-adk version 1.19.0 or higher, accessing the Swagger documentation page (typically at /docs on the adk web server) fails to display the API definition.

Instead of the normal documentation, the following error is shown:

Failed to load API definition.

Errors Hide Fetch error Internal Server Error /openapi.json

This issue strongly suggests a failure in the OpenAPI schema generation process, which is often related to compatibility between FastAPI and Pydantic versions. Downgrading FastAPI to version 0.115.0 resolves the issue, confirming a version conflict is the probable cause.

To Reproduce

  1. Install google-adk (version $\ge$ 1.19.0).
  2. Run the adk web command to start the local server.
    adk web
    
  3. Open the Swagger documentation page in a browser at:
    • http://127.0.0.1:8000/docs
  4. Observe the error displayed on the page as described above.

Expected Behavior

The Swagger documentation page (/docs) should load normally and display the generated OpenAPI schema after running adk web, providing the interactive documentation for the API.

Environment (Suggested Addition)

  • google-adk Version: $\ge$ 1.19.0
  • Operating System: [e.g., Ubuntu 22.04, macOS Ventura]
  • Python Version: [e.g., 3.10.12]
  • Temporary Fix (Working Configuration): Downgrading FastAPI to 0.115.0 resolves the issue.

Temporary Solution

Downgrade the ADK version to 1.16.0 .

acloudpotato avatar Nov 28 '25 12:11 acloudpotato

Same issue, hope it gets fixed

chiragpatil-lp avatar Dec 01 '25 10:12 chiragpatil-lp

Update FastAPI to:

fastapi[standard]==0.118.3

jmxt3 avatar Feb 12 '26 14:02 jmxt3