Skip to content

Remove OpenRouter Models by Provider backup#887

Merged
chrarnoldus merged 3 commits intomainfrom
christiaan/delete-backup
Mar 6, 2026
Merged

Remove OpenRouter Models by Provider backup#887
chrarnoldus merged 3 commits intomainfrom
christiaan/delete-backup

Conversation

@chrarnoldus
Copy link
Contributor

instead tell local users to run the script

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 6, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
src/app/api/openrouter/hooks.ts 134 Throwing here still leaves the current UI rendering an empty provider/model catalog
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
README.md 89 The docs still describe the deleted backup JSON fallback and removed pnpm script:run openrouter sync-providers-backup command.
Files Reviewed (9 files)
  • packages/db/src/schema.ts - 0 new issues
  • src/app/api/openrouter/hooks.ts - 1 new issue
  • src/app/api/openrouter/models-by-provider/route.ts - 0 new issues
  • src/data/openrouter-models-by-provider-backup.json - 0 new issues
  • src/lib/providers/openrouter/sync-providers.ts - 0 new issues
  • src/routers/byok-router.ts - 0 new issues
  • src/scripts/openrouter/sync-providers-backup.ts - 0 new issues
  • src/scripts/openrouter/sync-providers.ts - 0 new issues
  • src/tests/openrouter-models-backup-schema.test.ts - 0 new issues

if (!response.ok) {
console.error(`Failed to fetch: ${response.status} ${response.statusText}`);
return await parseModelsByProviderBackupData();
throw new Error(`Failed to fetch: ${response.status} ${response.statusText}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING: This still degrades to an empty provider/model state in the current UI

Throwing here makes React Query enter the error state, but useOpenRouterModelsAndProviders() still derives models and providers from query.data and returns [] when the fetch fails. The current callers only read those arrays or isLoading (OrganizationProvidersAndModelsPage, OrganizationProvidersAndModelsConfigurationCard, CondensedProviderAndModelsList), so once the backup is removed the missing-snapshot case will still look like a genuine "0 providers / 0 models" state instead of an actionable failure.

@chrarnoldus chrarnoldus merged commit 561eb64 into main Mar 6, 2026
13 checks passed
@chrarnoldus chrarnoldus deleted the christiaan/delete-backup branch March 6, 2026 13:13
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.

2 participants