Skip to content

fix(dialog): preserve explicit tool intent in the first model request - #223

Merged
iamwavecut merged 1 commit into
mainfrom
fix/preserve-first-tool-intent
Oct 10, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/preserve-first-tool-intent

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Explicit drawing requests lost requested_tool when the production materializer replaced routed job metadata with the canonical Telegram history payload. The model then received tool_choice: auto and no first-packet intent, despite the scheduler recording a direct request.

Preserve the router's intent when the canonical message has the same author and original text. Canonical content, author and thread still take precedence; an edited or different-author request cannot inherit the old intent. The existing native drawing regression now passes through the same canonicalization function used by Postgres instead of the current-message-only materializer.

Validation: reproduced the missing first-step tool requirement before the fix; 2463 workspace/all-target tests passed, 10 ignored; formatting, diff checks and workspace/all-target Clippy passed. Coverage includes absent/present original text, edited cancellation and changed author. No schema or protocol migration.

@github-actions

Copy link
Copy Markdown
Messages
📖 Danger checked 2 changed file(s).

Generated by 🚫 dangerJS against b81aaa8

@iamwavecut
iamwavecut merged commit fe69d5d into main Oct 10, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the fix/preserve-first-tool-intent branch October 10, 2026 12:05
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