fix: mark dotted-path callbacks read-only to prevent duplicate display

Configured callbacks loaded from dotted Python paths (e.g. custom_callbacks.my_logger) are never matched against runtime instances by name because the registry uses short canonical names (e.g. langsmith, arize). Mark these rows read-only to prevent the UI from attempting delete operations that would fail at the endpoint level anyway.
This commit is contained in:
Yucheng Zhu 2026-08-31 18:00:16 -07:00
parent 85e41aef99
commit 79bffe1a06

View file

@ -17113,13 +17113,22 @@ async def get_config(
"""
for _callback in _success_callbacks:
_data_to_return.append(process_callback(_callback, "success", environment_variables))
row: Final = process_callback(_callback, "success", environment_variables)
if isinstance(_callback, str) and "." in _callback:
row["read_only"] = True
_data_to_return.append(row)
for _callback in _failure_callbacks:
_data_to_return.append(process_callback(_callback, "failure", environment_variables))
row: Final = process_callback(_callback, "failure", environment_variables)
if isinstance(_callback, str) and "." in _callback:
row["read_only"] = True
_data_to_return.append(row)
for _callback in _success_and_failure_callbacks:
_data_to_return.append(process_callback(_callback, "success_and_failure", environment_variables))
row: Final = process_callback(_callback, "success_and_failure", environment_variables)
if isinstance(_callback, str) and "." in _callback:
row["read_only"] = True
_data_to_return.append(row)
configured_callback_names: Final = frozenset(
_normalize_callback_alias(callback)