Skip to content

fix: preserve append_to_last_tool_result when merging inject_context …#17

Closed
ramparte wants to merge 1 commit intomicrosoft:mainfrom
ramparte:fix/preserve-append-to-last-tool-result-in-merge
Closed

fix: preserve append_to_last_tool_result when merging inject_context …#17
ramparte wants to merge 1 commit intomicrosoft:mainfrom
ramparte:fix/preserve-append-to-last-tool-result-in-merge

Conversation

@ramparte
Copy link
Copy Markdown
Contributor

…HookResults

_merge_inject_context_results now checks whether ANY result requested append_to_last_tool_result and forwards the flag to the merged HookResult. Previously the field was dropped (defaulting to False), which caused the orchestrator to skip the tool-result merge path and create consecutive same-role messages instead of merging them.

🤖 Generated with Amplifier

…HookResults

_merge_inject_context_results now checks whether ANY result requested
append_to_last_tool_result and forwards the flag to the merged
HookResult.  Previously the field was dropped (defaulting to False),
which caused the orchestrator to skip the tool-result merge path and
create consecutive same-role messages instead of merging them.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
ekg added a commit to ekg/amplifier-core that referenced this pull request Feb 27, 2026
When the provider config has a 'name' field (from settings.yaml),
inject it as '_instance_name' into the provider config before loading.
This enables named provider instances where the same module
(e.g., provider-openai) can be used for multiple services
(openrouter, deepseek, etc.) with different names.

Companion to PR microsoft#17 on provider-openai which added _instance_name
support for named provider instances.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Copy link
Copy Markdown
Collaborator

Closing — the underlying bug is real (append_to_last_tool_result dropped during merge). Fixed in Rust hooks.rs (commit a8b2f65) since hooks.py was thinned to a 3-line alias in v1.3.0. Thanks for identifying this.

@bkrabach bkrabach closed this Mar 20, 2026
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