Skip to content

(MOT-4412) fix(llm-router): show providers on fresh installs - #785

Merged
ytallo merged 1 commit into
mainfrom
fix/llm-router-fresh-provider-config
Aug 12, 2026
Merged

(MOT-4412) fix(llm-router): show providers on fresh installs#785
ytallo merged 1 commit into
mainfrom
fix/llm-router-fresh-provider-config

Conversation

@ytallo

@ytallo ytallo commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render llm-router provider cards from the registered configuration schema before a configuration value exists
  • retain configured-only providers so stale or custom entries remain editable
  • add focused regression coverage for fresh, stale, and empty provider lists

Root cause

Fresh installations return null for the llm-router configuration value. The custom form built its cards only from value.providers, so it rendered an empty provider section even though the registered schema already contained Anthropic and OpenAI.

Impact

Users can configure provider credentials immediately after installing Harness and Console, without first creating an llm-router configuration entry through another path.

Testing

  • pnpm --filter @iii-workers/llm-router-ui test
  • pnpm --filter @iii-workers/llm-router-ui build
  • cargo build --manifest-path llm-router/Cargo.toml
  • live bundle verification against Console on 127.0.0.1:3113 with a null llm-router configuration

Refs MOT-4412

Summary by CodeRabbit

  • Bug Fixes

    • Provider configuration cards now include both available providers and previously saved providers, even when they are no longer in the current schema.
    • Duplicate or invalid provider entries are handled safely.
  • Tests

    • Added automated coverage for provider discovery, saved-provider retention, empty configurations, and invalid data handling.

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 12, 2026 10:14pm
workers-tech-spec Ready Ready Preview Aug 12, 2026 10:14pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ed314c56-1c80-4c39-81f7-7798e3684bb6

📥 Commits

Reviewing files that changed from the base of the PR and between 5e8e466 and ba0c4ad.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • llm-router/ui/package.json
  • llm-router/ui/src/configuration/index.tsx
  • llm-router/ui/src/configuration/provider-cards.test.ts
  • llm-router/ui/src/configuration/provider-cards.ts
  • llm-router/ui/vitest.config.ts

📝 Walkthrough

Walkthrough

The configuration UI now discovers provider cards from both the registered schema and saved configuration. New tests cover merging, empty values, and fresh installations. Vitest is configured for Node.js and exposed through the UI test script.

Changes

Provider Card Discovery

Layer / File(s) Summary
Provider ID resolution and validation
llm-router/ui/src/configuration/provider-cards.ts, llm-router/ui/src/configuration/index.tsx, llm-router/ui/src/configuration/provider-cards.test.ts, llm-router/ui/vitest.config.ts, llm-router/ui/package.json
providerCardIds safely combines schema and configured provider IDs, removes duplicates, and handles missing objects. LlmRouterConfigForm uses the utility. Vitest tests and the test script are configured.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to ba0c4

This localized change restores provider cards for fresh installations while preserving configured entries, with focused tests and builds reported; no actionable merge-blocking risk remains.

Possibly related PRs

  • iii-hq/workers#695: Introduced the llm-router configuration UI extended by this provider discovery change.

Poem

A rabbit checks the cards in line,
From schema fields and saved design.
Vitest hops through cases bright,
Fresh installs now render right.
Duplicate paths are tucked away.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: showing provider cards on fresh installations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/llm-router-fresh-provider-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 58 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@ytallo
ytallo marked this pull request as ready for review August 12, 2026 22:15
@ytallo
ytallo merged commit ef4e4a2 into main Aug 12, 2026
16 of 17 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.

1 participant