Skip to content

feat(plugin): show routing summary in /manifest command#1080

Open
guillaumegay13 wants to merge 3 commits intomnfst:mainfrom
guillaumegay13:feat/show-models-manifest-command
Open

feat(plugin): show routing summary in /manifest command#1080
guillaumegay13 wants to merge 3 commits intomnfst:mainfrom
guillaumegay13:feat/show-models-manifest-command

Conversation

@guillaumegay13
Copy link
Copy Markdown
Collaborator

@guillaumegay13 guillaumegay13 commented Mar 12, 2026

I would like to enrich the result of /manifest command to show more info such as :

  • active routing providers
  • current models used : Simple -> ... (auto) or Reasoning -> ... (override)

The plugin now reads a new OTLP-authenticated routing summary endpoint.

It's a first step towards a more broadly used manifest command that'll allow to change configurations such as switching between models.

This PR introduces only read-only changes tho.


Summary by cubic

Adds a routing summary to /manifest showing active providers and each tier’s effective model (auto vs override). Implements a new authenticated GET /api/v1/routing/summary and updates the plugin to display it with safe fallbacks.

  • New Features

    • Backend: GET /api/v1/routing/summary returns agentName, active providers (auth type), and tiers (simple, standard, complex, reasoning) with effective model, source, and fallback_models. Only active providers are returned, sorted by provider then auth type, and missing auth_type defaults to api_key. Missing tiers default to auto with null model, and fallback_models default to [].
    • Plugin: /manifest fetches the summary (5s timeout, Bearer from apiKey if set), prints “Providers” and “Routing”, formats auth types (“api key”/“subscription”), shows “unassigned” for null models, strips /otlp from endpoint to derive base URL, and logs/falls back silently if the summary is unavailable.
  • Tests

    • Backend: cover summary logic for missing tiers, provider sorting, and defaulting auth_type.
    • Plugin: cover successful summary output, empty providers and unknown tiers, Authorization header usage, failed requests, and non-Error failures; verify no summary fetch when connection verify fails.

Written for commit 508f455. Summary will update on new commits.

Related to #1081

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.02%. Comparing base (d14025f) to head (508f455).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
+ Coverage   99.01%   99.02%   +0.01%     
==========================================
  Files         223      223              
  Lines       11580    11626      +46     
  Branches     3650     3664      +14     
==========================================
+ Hits        11466    11513      +47     
  Misses         22       22              
+ Partials       92       91       -1     
Flag Coverage Δ
backend 98.53% <100.00%> (+<0.01%) ⬆️
frontend 99.84% <ø> (ø)
plugin 96.04% <100.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

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