Skip to content

Conversation

@abdulhuq811
Copy link
Contributor

Description

When using the current version of Llama Deploy, ran into a few issues:

  • If a task is submitted and handler does not have the Task ID yet, it throws a KeyError which results in the server not respecting the poll interval. The fix here is to catch the KeyError and raise a 404 error to allow the server to poll based on the poll interval.
  • If session_id is passed in as part of the Task Definition, it is not used, instead it is treated as None and a new session is created. Resolution for this is to allow setting the session_id if passed in as part of the Task Definition, this allows for re-using session context.
  • When the output type is AgentOutput, then the get_task_result endpoint fails as the result is not of type string. Resolve this by converting AgentOutput to string and using that in the result.

Added appropriate unit tests for the changes.

…perly poll events

Allow passing in session id as part of task definition to stitch context together

Allow parsing AgentOutput types in task result
@abdulhuq811 abdulhuq811 changed the title Fixes/handle missing tasks Fixes: Handle missing tasks, use session_id passed as part of Task Definition, and handle AgentOutput in task result Oct 2, 2025
@coveralls
Copy link

coveralls commented Oct 2, 2025

Coverage Status

coverage: 87.223% (+0.2%) from 87.011%
when pulling 8fdfc23 on abdulhuq811:fixes/handle-missing-tasks
into dbe7897 on run-llama:main.

@abdulhuq811
Copy link
Contributor Author

@masci Can you help review these changes? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants