llama-stack-mirror/llama_stack
ehhuang cf422da825 fix: responses <> chat completion input conversion (#3645)
# What does this PR do?

closes #3268
closes #3498

When resuming from previous response ID, currently we attempt to convert
from the stored responses input to chat completion messages, which is
not always possible, e.g. for tool calls where some data is lost once
converted from chat completion message to repsonses input format.

This PR stores the chat completion messages that correspond to the
_last_ call to chat completion, which is sufficient to be resumed from
in the next responses API call, where we load these saved messages and
skip conversion entirely.

Separate issue to optimize storage:
https://github.com/llamastack/llama-stack/issues/3646

## Test Plan
existing CI tests
2025-10-02 21:50:13 -07:00
..
apis fix: responses <> chat completion input conversion (#3645) 2025-10-02 21:50:13 -07:00
cli feat: migrate to FIPS-validated cryptographic algorithms (#3423) 2025-09-12 11:18:19 +02:00
core feat(tools)!: substantial clean up of "Tool" related datatypes (#3627) 2025-10-02 21:50:13 -07:00
distributions docs: Fix Dell distro documentation code snippets (#3640) 2025-10-02 11:11:30 +02:00
models feat(tools)!: substantial clean up of "Tool" related datatypes (#3627) 2025-10-02 21:50:13 -07:00
providers fix: responses <> chat completion input conversion (#3645) 2025-10-02 21:50:13 -07:00
strong_typing feat(files): fix expires_after API shape (#3604) 2025-09-29 21:29:15 -07:00
testing feat: (re-)enable Databricks inference adapter (#3500) 2025-09-23 15:37:23 -04:00
ui fix: Remove deprecated user param in OpenAIResponseObject (#3596) 2025-09-29 13:55:59 -07:00
__init__.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore: fix/add logging categories (#3658) 2025-10-02 21:50:12 -07:00
schema_utils.py feat(api): level inference/rerank and remove experimental (#3565) 2025-09-29 12:42:09 -07:00