Transcripts don't keep text from tool rounds in place
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing how tool calls, tool outputs, and response text are added to the transcript across rounds, then compare that with the restored ordering described for an Anthropic turn. Decide how per-round text should be represented for all providers, and verify that reasoning, text, tool-use, and tool-result entries replay in their original order.
Written by the indexing model from the issue text.
Description
When a model writes text in the same turn as a tool call, the transcript doesn't record it where it happened. Tool calls and their outputs are added round by round, but the session adds all of the response's text once, after the last round, as one response entry (#265 combines earlier rounds' text into it). So an Anthropic turn like [thinking, text, tool_use] replays from a restored transcript as [thinking, tool_use], then the tool result, then the text.
With reasoning entries (#290), the order matters more: the model sees its earlier explanation after the tool result instead of before it. Recording a response entry for each round's text would keep the original order, but it changes what a transcript looks like for every provider, so it's worth deciding on its own.
- Dominant language
- Swift
- Stars
- 948
- Forks
- 99
- Avg merge
- 18h 38m
- Merged PRs (30d)
- 56
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from huggingface/AnyLanguageModel
-
OpenAILanguageModel replays tool-call arguments as GeneratedContent's Codable form, not JSONPossibly taken @gtokman claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
huggingface/AnyLanguageModel#324 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
huggingface/AnyLanguageModel#326 ·
Maintainers usually reply within 1 day
-
Support the Gemini Interactions API in GeminiLanguageModelPossibly taken @rizwankce claimed this 6 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 45/100
huggingface/AnyLanguageModel#302 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
huggingface/AnyLanguageModel#210 · 5 comments · 3 reactions ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
huggingface/AnyLanguageModel#114 · 4 comments ·
Maintainers usually reply within 1 day
All issues in huggingface/AnyLanguageModel
Similar issues
-
builtin-port enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cmlarsen/writemorebetter#235 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstack/agent-device#3627 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
maziyarpanahi/openmed#4207 · 1 comment ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
meshtastic/Meshtastic-Apple#2603 ·
Maintainers usually reply within 1 day