Skip to content

Conversation

@racinmat
Copy link

@racinmat racinmat commented Aug 15, 2025

Fixes google/adk-web#218.
Blocked by #2556, it depends on it because of the base_url.
Supersedes #2254 because that did not get requested for review and adk-bot was not triggered there for some reason.
I didn't figure out any better way to do this. Basically we need to have a way how to provide a custom URL to the assets/config/runtime-config.json. I have tested with my project that it works well.
The redirect to dev-ui needed some fixes too, so I added fixes and tests for that.

testing plan

I have added test that demonstrates the functionality in a sub-app.

I ran the relevant tests to my code and here are the results, everything passes.

 pytest ./tests/unittests/cli/test_fast_api.py   
======================================================================================================================= test session starts =======================================================================================================================
platform win32 -- Python 3.12.8, pytest-8.4.1, pluggy-1.6.0
rootdir: C:\Projects\others\adk-python
configfile: pyproject.toml
plugins: anyio-4.9.0, langsmith-0.3.45, asyncio-1.1.0, mock-3.14.1, xdist-3.8.0
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 36 items                                                                                                                                                                                                                                                 

tests\unittests\cli\test_fast_api.py ....................................                                                                                                                                                                                    [100%]

@adk-bot adk-bot added bot triaged web [Component] This issue will be transferred to adk-web labels Aug 15, 2025
@adk-bot adk-bot requested a review from wyf7107 August 15, 2025 21:49
@racinmat
Copy link
Author

racinmat commented Aug 15, 2025

@wyf7107 see how this PR is fixing the issues in the code, google/adk-web#218
and here the tests pass, you can verify it by running such test without the fix from my PR. It will fail.

@danowar2
Copy link

That's the place

@racinmat
Copy link
Author

@wyf7107 Hi, would you be so kind and review this PR?

@racinmat
Copy link
Author

@wyf7107 could you take a look?

@wyf7107
Copy link
Collaborator

wyf7107 commented Nov 5, 2025

Did you try to get a custom url to [assets/config/runtime-config.json](https://github.com/google/adk-web/blob/03b23e615db45ec912bf75aae1259cafad03c5d6/src/assets/config/runtime-config.json)? Want to understand the reasoning behind, if you are trying to use a proxy, then can you try adk web ----url_prefix, we recently added this.

In theory we don't expect users to override the value in that file since adk web and the api server wil talk to each other in the same server.

@racinmat
Copy link
Author

racinmat commented Nov 9, 2025

How can you programatically and reasonably get the value to the config you mentioned? It's part of a library, libraries are installed by package manager without reasonable way of modifying their contents. Yes, locally I tried to modify the contents when I was debugging it, but that's unusable for regular usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Javascript is broken with FastAPI sub-application.

5 participants