-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
tech-debtTechnical DebtTechnical Debt
Description
🤔 What is the technical debt you think should be addressed?
Currently, if the telemetry API/provider is not defined in the run.yaml
configuration, the llama-stack fails with an UnboundLocalError
in agent_instance.py
(turn_id variable not associated with a value). This failure path is misleading, as the root cause is simply that telemetry is required but not configured. The code does not provide a clear error message indicating that telemetry is mandatory, which makes debugging more difficult.
Error:
File "<project-path>.venv/lib/python3.12/site-packages/llama_stack/providers/inline/agents/meta_reference/agent_instance.py", line 191, in create_and_execute_turn
async for chunk in self._run_turn(request, turn_id):
^^^^^^^
UnboundLocalError: cannot access local variable 'turn_id' where it is not associated with a value
💡 What is the benefit of addressing this technical debt?
Improving error handling to explicitly indicate that telemetry is required would:
- Prevent developer confusion when debugging missing configurations.
- Reduce wasted time interpreting misleading stack traces.
- Make the system's requirements clearer and easier to document.
- Lay the groundwork for potentially making telemetry optional in the future, or at least providing graceful fallback behavior.
Other thoughts
No response
Metadata
Metadata
Assignees
Labels
tech-debtTechnical DebtTechnical Debt