Skip to content

fix: preserve wrapped provider identity and effective model in hooks - #63

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/provider-request-provenance
Sep 22, 2026
Merged

Brian Krabach (bkrabach) merged 1 commit into
mainfrom
fix/provider-request-provenance

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

A host can wrap its selected conversation provider without replacing the mounted provider registry. The loop currently identifies that provider using direct object identity, emits provider:request with provider=null, and computer-use can then choose the wrong mounted provider's native tool format. A model pinned by the wrapper also needs to reach hooks before native tool declarations are copied into the request.

Resolve the mounted alias through original/wrapped identity links, retaining the selected wrapper for execution. Include the effective model on provider:request events before request construction; independently resolved goal utility requests report their own model. Matching never uses vendor ids or names, and mounted provider instances, worker routing, and configured defaults remain unchanged. Wrapper cycles and ambiguous provenance terminate without choosing an arbitrary alias.

Validation: the full loop test suite passed, 422 tests, using the deployed worker's Python and amplifier-core. Regressions cover multiple instances of the same vendor, changed root selection with an unchanged warmed provider map, both reminder placements, effective model visibility before native-tool snapshots, and unchanged goal/default routing. Ruff reports the same 14 pre-existing findings and no new findings; diff whitespace checks pass.

An isolated integration used Unified's actual SelectedProvider and SurfaceProvider classes plus the companion computer-use fix, verifying OpenAI and two different Anthropic instances with model overrides. This is offline validation: live Anthropic inference and API acceptance remain pending, and no deployment is claimed.

Companion hook change: microsoft/amplifier-bundle-computer-use#22

Tested parent revision: 008e096.

@bkrabach
Brian Krabach (bkrabach) marked this pull request as ready for review September 22, 2026 02:46
@bkrabach
Brian Krabach (bkrabach) merged commit 4cc86dd into main Sep 22, 2026
4 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.

2 participants