fix(team): resolve provider_id from providers table for aionrs spawn#236
Merged
Conversation
added 2 commits
May 12, 2026 11:09
When spawning aionrs-type agents in team mode, the backend string "aionrs" was used directly as provider_id in ProviderWithModel. Since "aionrs" is an agent type (not a provider), the factory failed with "Provider 'aionrs' not found" during warmup, leaving spawned agents unable to start or respond to messages. Add resolve_provider_for_model() that iterates enabled providers to find the one containing the requested model, and use its real ID as provider_id. Applied to all three conversation-creation paths: create_team, add_agent, and persist_spawned_agent.
Collapse nested if-let into a single condition with `&&` to satisfy clippy::collapsible_if (introduced in #235).
64aeb8f to
f72db0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
provider_idinProviderWithModel. Since "aionrs" is an agent type (not a provider entry), the aionrs factory failed withProvider 'aionrs' not foundduring warmup — leaving spawned agents unable to start or respond to messages.resolve_provider_for_model()that iterates enabled providers to find the one containing the requested model, then uses its real ID asprovider_id.create_team,add_agent, andpersist_spawned_agent.Test plan
cargo test -p aionui-team— all 476 tests pass