Skip to content

fix: keep active request after prompt-guided tool results - #29

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:transcript-hi-investigation
Sep 25, 2026
Merged

senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:transcript-hi-investigation

Conversation

@senamakel

@senamakel senamakel commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Anchor the latest real user request after a prompt-guided tool result in the outgoing model request.
  • Apply this to OpenAI-compatible prompt-guided dispatch and expose the helper to the TinyAgents dialect.
  • Add tests for a greeting followed by an email tool search result and for result-only histories.

Why

In an OpenHuman transcript, a DeepSeek V4 Flash continuation received the full email request and Gmail tool-search result but answered the earlier greeting twice. The synthetic tool-result user message was the final user-role message. Repeating the latest real request after it keeps the active task at the end of the provider request without changing the stored transcript.

Verification

  • cargo test --manifest-path Cargo.toml -p tinyinference-llm prompt_tools::test --lib (17 passed)
  • cargo fmt --manifest-path Cargo.toml --all --check

Summary by CodeRabbit

  • Bug Fixes
    • Improved continuity after tool results: prompt-guided tool interactions now include the latest resolvable user request, rather than relying only on the tool output.
    • Earlier conversational text is excluded from the carried-forward request, and conversations without a usable request remain unchanged.

@tinysweeper

tinysweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

⚠️ Review failed for e39f8ab4b2d0. the review of #29 did not finish within 900s

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3dabdbd2-99f1-46b1-a1c0-d50f57fab638

📥 Commits

Reviewing files that changed from the base of the PR and between 9c5b411 and e39f8ab.

📒 Files selected for processing (3)
  • crates/tinyinference-llm/src/prompt_tools/mod.rs
  • crates/tinyinference-llm/src/prompt_tools/test.rs
  • crates/tinyinference-llm/src/providers/openai/transport.rs
 _______________________________________________
< Crouching Tiger, Hidden NullPointerException. >
 -----------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit 6ed7dae into tinyhumansai:main Sep 25, 2026
3 of 5 checks passed
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.

1 participant