Skip to content

fix(team): resolve provider_id from providers table for aionrs spawn#236

Merged
piorpua merged 2 commits into
mainfrom
fix/team-aionrs-provider-lookup
May 12, 2026
Merged

fix(team): resolve provider_id from providers table for aionrs spawn#236
piorpua merged 2 commits into
mainfrom
fix/team-aionrs-provider-lookup

Conversation

@piorpua

@piorpua piorpua commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When spawning aionrs-type agents in team mode, the backend string "aionrs" was incorrectly used as provider_id in ProviderWithModel. Since "aionrs" is an agent type (not a provider entry), the aionrs factory failed with Provider 'aionrs' not found during warmup — leaving spawned agents unable to start or respond to messages.
  • Added resolve_provider_for_model() that iterates enabled providers to find the one containing the requested model, then uses its real ID as provider_id.
  • Applied the fix to all three conversation-creation paths: create_team, add_agent, and persist_spawned_agent.

Test plan

  • Create a team with aionrs-type members using different models (e.g. deepseek-v4-pro, gemini-3.1-pro-preview)
  • Verify agents warm up successfully without "Provider not found" error
  • Verify sending messages to aionrs team members gets responses
  • Verify existing ACP-type team members (claude, codex) still work correctly
  • Run cargo test -p aionui-team — all 476 tests pass

zynx 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).
@piorpua piorpua force-pushed the fix/team-aionrs-provider-lookup branch from 64aeb8f to f72db0e Compare May 12, 2026 03:15
@piorpua piorpua enabled auto-merge May 12, 2026 03:18
@piorpua piorpua merged commit 86a9f41 into main May 12, 2026
5 checks passed
@piorpua piorpua deleted the fix/team-aionrs-provider-lookup branch May 12, 2026 03:24
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