Skip to content

pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'httpx.Client'>) #3316

@diefergil

Description

@diefergil

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
uv run adk api_server is not rendering the /docs

For further information visit https://errors.pydantic.dev/2.12/u/invalid-for-json-schema`

To Reproduce
Please share a minimal code and data to reproduce your problem.
Steps to reproduce the behavior:
2. Run 'uv run adk api_server'
3. Open 'http://localhost:8000/docs'
4. Provie error or stacktrace
5.

raise PydanticInvalidForJsonSchema(f'Cannot generate a JsonSchema for {error_info}')
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'httpx.Client'>)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: mac os
  • Python version(python -V): 3.12
  • ADK version(pip show google-adk):
pip list                                                                                                                                                                                                                   $(/opt/homebrew/bin/starship prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")
Package                                    Version     Editable project location
------------------------------------------ ----------- --------------------------------------------------------
absolufy-imports                           0.3.1
ag-ui-adk                                  0.3.1
ag-ui-protocol                             0.1.9
aiohappyeyeballs                           2.6.1
aiohttp                                    3.13.1
aiosignal                                  1.4.0
alembic                                    1.17.0
annotated-types                            0.7.0
anyio                                      4.11.0
asyncio                                    4.0.0
attrs                                      25.4.0
Authlib                                    1.6.5
cachetools                                 6.2.1
certifi                                    2025.10.5
cffi                                       2.0.0
charset-normalizer                         3.4.4
click                                      8.3.0
cloudpickle                                3.1.1
cryptography                               46.0.3
distro                                     1.9.0
docstring_parser                           0.17.0
fastapi                                    0.118.3
fastuuid                                   0.14.0
filelock                                   3.20.0
frozenlist                                 1.8.0
fsspec                                     2025.9.0
google-adk                                 1.17.0
google-api-core                            2.28.0
google-api-python-client                   2.185.0
google-auth                                2.41.1
google-auth-httplib2                       0.2.0
google-cloud-aiplatform                    1.122.0
google-cloud-appengine-logging             1.7.0
google-cloud-audit-log                     0.4.0
google-cloud-bigquery                      3.38.0
google-cloud-bigtable                      2.34.0
google-cloud-core                          2.4.3
google-cloud-discoveryengine               0.13.12
google-cloud-logging                       3.12.1
google-cloud-monitoring                    2.28.0
google-cloud-resource-manager              1.15.0
google-cloud-secret-manager                2.25.0
google-cloud-spanner                       3.59.0
google-cloud-speech                        2.34.0
google-cloud-storage                       2.19.0
google-cloud-trace                         1.17.0
google-crc32c                              1.7.1
google-genai                               1.46.0
google-resumable-media                     2.7.2
googleapis-common-protos                   1.71.0
graphviz                                   0.21
grpc-google-iam-v1                         0.14.3
grpc-interceptor                           0.15.4
grpcio                                     1.76.0
grpcio-status                              1.76.0
h11                                        0.16.0
hf-xet                                     1.2.0
httpcore                                   1.0.9
httplib2                                   0.31.0
httpx                                      0.28.1
httpx-sse                                  0.4.3
huggingface-hub                            1.0.1
idna                                       3.11
importlib_metadata                         8.7.0
jaraco.classes                             3.4.0
jaraco.context                             6.0.1
jaraco.functools                           4.3.0
Jinja2                                     3.1.6
jiter                                      0.11.1
joblib                                     1.5.2
jsonschema                                 4.25.1
jsonschema-specifications                  2025.9.1
keyring                                    25.6.0
keyrings.google-artifactregistry-auth      1.1.2
litellm                                    1.76.3
Mako                                       1.3.10
MarkupSafe                                 3.0.3
mcp                                        1.19.0
more-itertools                             10.8.0
multidict                                  6.7.0
numpy                                      2.3.4
openai                                     2.6.1
opentelemetry-api                          1.37.0
opentelemetry-exporter-gcp-logging         1.10.0a0
opentelemetry-exporter-gcp-monitoring      1.10.0a0
opentelemetry-exporter-gcp-trace           1.10.0
opentelemetry-exporter-otlp-proto-common   1.37.0
opentelemetry-exporter-otlp-proto-http     1.37.0
opentelemetry-instrumentation              0.58b0
opentelemetry-instrumentation-google-genai 0.4b0
opentelemetry-proto                        1.37.0
opentelemetry-resourcedetector-gcp         1.10.0a0
opentelemetry-sdk                          1.37.0
opentelemetry-semantic-conventions         0.58b0
opentelemetry-util-genai                   0.2b0
packaging                                  25.0
pandas                                     2.3.3
pip                                        24.2
pluggy                                     1.6.0
propcache                                  0.4.1
proto-plus                                 1.26.1
protobuf                                   6.33.0
pyasn1                                     0.6.1
pyasn1_modules                             0.4.2
pycparser                                  2.23
pydantic                                   2.12.3
pydantic_core                              2.41.4
pydantic-settings                          2.11.0
pyparsing                                  3.2.5
python-dateutil                            2.9.0.post0
python-dotenv                              1.2.1
python-multipart                           0.0.20
pytz                                       2025.2
PyYAML                                     6.0.3
referencing                                0.37.0
regex                                      2025.10.23
requests                                   2.32.5
rpds-py                                    0.28.0
rsa                                        4.9.1
ruamel.yaml                                0.18.16
ruamel.yaml.clib                           0.2.14
scikit-learn                               1.7.2
scipy                                      1.16.2
shapely                                    2.1.2
shellingham                                1.5.4
six                                        1.17.0
sniffio                                    1.3.1
SQLAlchemy                                 2.0.44
sqlalchemy-spanner                         1.17.1
sqlparse                                   0.5.3
sse-starlette                              3.0.2
starlette                                  0.48.0
tenacity                                   8.5.0
threadpoolctl                              3.6.0
tiktoken                                   0.12.0
tokenizers                                 0.22.1
tqdm                                       4.67.1
typer-slim                                 0.20.0
typing_extensions                          4.15.0
typing-inspection                          0.4.2
tzdata                                     2025.2
tzlocal                                    5.3.1
uritemplate                                4.2.0
urllib3                                    2.5.0
uvicorn                                    0.38.0
watchdog                                   6.0.0
websockets                                 15.0.1
wrapt                                      1.17.3
yarl                                       1.22.0
zipp                                       3.23.0

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used(e.g. gemini-2.5-pro)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

web[Component] This issue will be transferred to adk-web

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions