Skip to content

Add STS trace support (HuggingChat, llama.app) - #38

Merged
armand0e merged 1 commit into
TeichAI:mainfrom
cfahlgren1:cfahlgren1/sts-trace-support
Nov 16, 2026
Merged

armand0e merged 1 commit into
TeichAI:mainfrom
cfahlgren1:cfahlgren1/sts-trace-support

Conversation

@cfahlgren1

@cfahlgren1 cfahlgren1 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds the Hugging Face Session Trace Simple Format, the STS JSONL that HuggingChat, llama.app and others export, so those traces can become SFT data. Before this they were detected as Pi and lost their tool calls.

Example traces: cfahlgren1/sts-format-traces

@cfahlgren1 cfahlgren1 changed the title Add STS session trace format support Add STS trace support (HuggingChat, llama.app) Nov 16, 2026
@armand0e
armand0e marked this pull request as ready for review November 16, 2026 18:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T18:14:55.515688Z e5c3c7c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@armand0e

Copy link
Copy Markdown
Collaborator

Looks good, thanks!

@armand0e
armand0e merged commit ffafbdd into TeichAI:main Nov 16, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5c3c7cd79

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/teich/converter.py
Comment on lines +2920 to +2924
"role": "tool",
"tool_call_id": tool_call_id,
"name": tool_names_by_call_id.get(tool_call_id, "unknown_tool"),
"content": content,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve failed STS tool results

When an STS role: "tool" event carries isError: true, this newly constructed message discards the flag and emits only the output text. The other trace converters normalize failed results to is_error: true, so these STS rows make failures indistinguishable from successful calls and can corrupt SFT supervision; copy the flag onto the normalized tool message.

Useful? React with 👍 / 👎.

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