-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Copy link
Labels
bot triaged[Bot] This issue is triaged by ADK bot[Bot] This issue is triaged by ADK botweb[Component] This issue will be transferred to adk-web[Component] This issue will be transferred to adk-web
Description
Describe the bug
This is related to #2072.
When adk-produced fastapi app is mounted as subapp, the URL is hardcoded here, and while it allows me to provide host and port, it would be better to let user pass whole url. And it's not possible to set https if the app is running under some ingress which uses TLS.
To Reproduce
Steps to reproduce the behavior:
Let's say I have the agent in agent_basic
directory.
- Make the agent
from pathlib import Path
import uvicorn
from fastapi import FastAPI
from google.adk.cli.fast_api import get_fast_api_app
app = FastAPI()
adk_app = get_fast_api_app(
agents_dir=str((Path(__file__) / '..').absolute()),
session_service_uri="sqlite:///:memory:",
allow_origins=["*"],
web=True,
)
app.mount("/adk", adk_app)
uvicorn.run(app, host="0.0.0.0", port=8081)
- Run the code
- Visit
http://localhost:8081/adk/a2a/agent_basic/.well-known/agent.json
- The resulting json shows
"url":"http://localhost:8081/a2a/agent_basic"
although the correct url is"url":"http://localhost:8081/adk/a2a/agent_basic"
Desktop (please complete the following information):
- OS: Windows 11
- Python version(python -V): Python 3.12.8
- ADK version(pip show google-adk): 1.7.0
Model Information:
Regardless of the model.
Additional context
I don't think anyting more is needed.
Metadata
Metadata
Assignees
Labels
bot triaged[Bot] This issue is triaged by ADK bot[Bot] This issue is triaged by ADK botweb[Component] This issue will be transferred to adk-web[Component] This issue will be transferred to adk-web