Agent request fails immediately or shortly after sending a question, returning "Something is wrong. Please try again." error. Diagnostics return a following error with a 500 error code:
Traceback (most recent call last): File "libs/llm/streaming.py", line 39, in standard_streaming_wrapper File "libs/llm/streaming.py", line 182, in format_generator_payload File "libs/llm/streaming.py", line 125, in apply_fn_to_last_event File "app/routes/ask.py", line 233, in ask_bot_streaming File "app/routes/ask.py", line 348, in ask_bot File "app/crud/ask.py", line 264, in ask_bot_controller UnboundLocalError: cannot access local variable 'adc_service' where it is not associated with a value.
Additional diagnostics - debug.log - also shows:
Error in getting resolved security filters ::: error code: 500, error message: b'{\"code\":\"ERR002\",\"message\":\"\",\"ticketId\":\"6d395c5a9c52490e97341503bf26c60a\"}'
The UnboundLocalError for adc_service is a downstream effect of a failure in retrieving resolved security filters.
The security filter request fails with error ERR002, which is caused by a cube instance mismatch between:
• The cube instance used for the GET security filter request, and
• The cube instance the Intelligence Server actually receives the request for.
When the security filter resolution fails, it leads to UnboundLocalError: cannot access local variable 'adc_service' where it is not associated with a value.
Re-enable AI for the affected cubes. Re-enabling AI forces the cube/AI integration to refresh, resolving the cube instance mismatch that causes the security filter error.