diff --git a/tests/trace/test_client_feedback.py b/tests/trace/test_client_feedback.py index 82d87198e13..c01127370a5 100644 --- a/tests/trace/test_client_feedback.py +++ b/tests/trace/test_client_feedback.py @@ -228,7 +228,7 @@ def test_feedback_payload(client): def test_feedback_create_too_large(client): project_id = client._project_id() - value = "a" * 10000 + value = "a" * (1 << 21) # > 1 MiB, past the limit req = tsi.FeedbackCreateReq( project_id=project_id, wb_user_id="VXNlcjo0NTI1NDQ=", diff --git a/weave/trace_server/clickhouse_trace_server_batched.py b/weave/trace_server/clickhouse_trace_server_batched.py index 973d51080e2..e97e020b1ab 100644 --- a/weave/trace_server/clickhouse_trace_server_batched.py +++ b/weave/trace_server/clickhouse_trace_server_batched.py @@ -1312,7 +1312,7 @@ def feedback_create(self, req: tsi.FeedbackCreateReq) -> tsi.FeedbackCreateRes: created_at = datetime.datetime.now(ZoneInfo("UTC")) # TODO: Any validation on weave_ref? payload = _dict_value_to_dump(req.payload) - MAX_PAYLOAD = 1024 + MAX_PAYLOAD = 1 << 20 # 1 MiB if len(payload) > MAX_PAYLOAD: raise InvalidRequest("Feedback payload too large") row: Row = {