Skip to content

Conversation

@refriigerator
Copy link

Summary

This PR refactors the swarm_dashboard.py to include a Model Selection History panel, enabling real-time visualization of the Contextual Bandit's routing decisions.

Changes

  • New Panel: Added "Recent Model Activity" to the dashboard, displaying the last 15 task outcomes (Time, Model, Task, Status, Cost).
  • Contextual Routing Visualization: The history panel surfaces the why behind model selection, integrating data from the new routing_decisions table.
  • Path Resolution: Introduced swarm/path_resolver.py to dynamically locate metrics databases, fixing hardcoded path issues and ensuring consistency across the orchestrator.
  • Metrics Seeding: Added swarm/benchmark/seed_metrics.py to bootstrap the routing intelligence with historical performance data.

Live Test Results

The refactor was verified in a live test where the Swarm correctly routed:

  • Planning tasks to deepseek-reasoner-r1 (100% reasoning success).
  • Coding tasks to gemini-2.5-flash (high speed/low cost).
  • Integration tasks to grok-code (free-tier optimization).

The dashboard successfully displayed these decisions, providing transparency into the agentic workflow.

…ting visualization

- Integrated fetch_model_history to display recent task outcomes.
- Updated dashboard layout with a dedicated history panel.
- Enabled dynamic path resolution for metrics databases.
- Added seed script for benchmarking and contextual bandit training.
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant