diff --git a/.changeset/olive-lights-hide.md b/.changeset/olive-lights-hide.md new file mode 100644 index 0000000000000..45ddfeac23133 --- /dev/null +++ b/.changeset/olive-lights-hide.md @@ -0,0 +1,5 @@ +--- +"gradio": patch +--- + +fix:Fix API info bug diff --git a/gradio/routes.py b/gradio/routes.py index 77a839ee8adfc..1e40ed45a70e7 100644 --- a/gradio/routes.py +++ b/gradio/routes.py @@ -576,7 +576,8 @@ def api_info(request: fastapi.Request): app.all_app_info = app.get_blocks().get_api_info(all_endpoints=True) return app.all_app_info if not app.api_info: - api_info = cast(dict[str, Any], app.get_blocks().get_api_info()) + api_info = utils.safe_deepcopy(app.get_blocks().get_api_info()) + api_info = cast(dict[str, Any], api_info) api_info = route_utils.update_example_values_to_use_public_url(api_info) app.api_info = api_info return app.api_info