Skip to content

Bug Report for acp-sdk. /docs #111

@sragavan23-cmd

Description

@sragavan23-cmd

Description:
The /docs endpoint fails to generate OpenAPI schema due to a Pydantic compatibility issue with the ResourceLoader class in acp_sdk.shared.resources.
Environment:
OS: macOS 24.6.0
Python: 3.11
acp-sdk: 1.0.3
uvicorn: 0.30.0
pydantic: 2.2.0
fastapi: 0.119.0 (installed as dependency of acp-sdk)
Error:
Minimal Reproducible Example:
Steps to Reproduce:
Install acp-sdk==1.0.3
Run the above code
Navigate to http://127.0.0.1:8000/docs
The page loads but shows "Failed to load API definition" error
Check server logs for the PydanticSchemaGenerationError
Expected Behavior:
The /docs endpoint should load the OpenAPI schema successfully and display interactive API documentation.
Actual Behavior:
The /docs page loads but fails to generate the OpenAPI schema, showing "Failed to load API definition" error.
Additional Notes:
The server runs successfully and agent endpoints work via direct HTTP requests
The issue only affects the OpenAPI documentation generation
The error suggests setting arbitrary_types_allowed=True in model_config or implementing get_pydantic_core_schema method
This appears to be a compatibility issue between acp-sdk and newer versions of Pydantic
Workaround:
None found. The core functionality works, but documentation is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions