Skip to content

refactor: remove 9 low-usage providers and add retired-provider UX#11297

Open
hannesrudolph wants to merge 9 commits intomainfrom
refactor/phase0-remove-low-usage-providers
Open

refactor: remove 9 low-usage providers and add retired-provider UX#11297
hannesrudolph wants to merge 9 commits intomainfrom
refactor/phase0-remove-low-usage-providers

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Feb 7, 2026

Summary

image image

Remove 9 low-usage providers from the codebase and add graceful UX for users who had profiles configured for them.

Providers removed: Cerebras, Chutes, DeepInfra, Doubao, Featherless, Groq, Hugging Face, IO Intelligence, Unbound

Changes

Provider removal (commit 1)

  • Delete 44 provider-specific files — handlers, tests, fetchers, UI components, model definitions
  • Remove @ai-sdk/cerebras and @ai-sdk/groq npm dependencies from src/package.json
  • Clean provider references from ~70 shared files across src/, packages/types/, webview-ui/, and apps/
  • Remove ~490 dead i18n translation keys across 36 locale files
  • Fix apps/web-evals dependency — update @roo-code/types from published npm version to workspace:^

Retired-provider UX (commit 2)

When a user has a saved API profile referencing a removed provider:

  • Profile data is fully preserved (API key, model ID, base URL, etc.) until the user deletes it
  • Settings UI shows an empathetic message explaining the removal instead of the provider config form
  • Retired provider names survive Zod parsing via retiredProviderNames array and isRetiredProvider() helper
  • Downstream code narrows retired providers to undefined so the Anthropic safety-net fallback is reached cleanly

Verification

  • TypeScript: all 14 packages pass check-types
  • Lint: all 14 packages pass
  • Tests: 5,290 pass in src/, 1,215 pass in webview-ui/ — 0 failures
  • Grep sweep: zero stale references to removed providers in source code

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 7, 2026
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Feb 7, 2026

⚠️ This PR is too big for Ellipsis, but support for larger PRs is coming soon. If you want us to prioritize this feature, let us know at help@ellipsis.dev


Generated with ❤️ by ellipsis.dev

@roomote
Copy link
Contributor

roomote bot commented Feb 7, 2026

Rooviewer Clock   See task

Reviewed the incremental diff (2a1be4f since b4733a4). This commit updates the ApiOptions test to expect the i18n key instead of the hardcoded English string, completing the i18n migration for retired-provider messaging. All 4 previously flagged issues remain resolved. No new issues found.

  • Retired-provider-specific fields silently stripped during load/save -- providerSettingsWithIdSchema.parse() in ProviderSettingsManager.load() and saveConfig() drops fields like groqApiKey, deepInfraModelId, unboundModelId, etc. that are no longer in the schema. The exportProviderProfiles() path correctly skips parsing for retired providers, but load/save do not. (comment)
  • Hardcoded English string for retired-provider message in ApiOptions.tsx -- The message in ApiOptions.tsx is not using i18n, unlike all other user-facing strings in the settings UI. (comment)
  • RetiredProviderWarning.tsx is now dead code -- The import was removed from ChatView.tsx (the only consumer) but the file still exists. (comment)
  • Hardcoded English string for retired-provider warning in ChatView.tsx -- The WarningRow title, message, and actionText props are hardcoded English, same pattern as the ApiOptions.tsx issue but in a different file. (comment)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Remove Cerebras, Chutes, DeepInfra, Doubao, Featherless, Groq,
Hugging Face, IO Intelligence, and Unbound providers from the codebase.

Each provider removal includes: handler, tests, model definitions,
type schemas, UI settings components, fetchers, i18n references,
and all wiring in shared registration/config files.

- Delete 42 provider-specific files (handlers, tests, fetchers, UI components)
- Remove @ai-sdk/cerebras and @ai-sdk/groq npm dependencies
- Clean provider references from 68 shared files across src/, packages/types/,
  webview-ui/, and apps/cli/
- Remove ~490 dead i18n translation keys across 36 locale files
- Add docs/ai-sdk-migration-guide.md with updated migration status
- All TypeScript checks pass, 6505 tests pass with 0 failures
@hannesrudolph hannesrudolph force-pushed the refactor/phase0-remove-low-usage-providers branch from dc835f5 to e8158b4 Compare February 8, 2026 00:24
@hannesrudolph hannesrudolph marked this pull request as draft February 8, 2026 00:29
@hannesrudolph hannesrudolph changed the title refactor: remove 9 low-usage providers (Phase 0) refactor: remove 9 low-usage providers and add retired-provider UX Feb 8, 2026
@hannesrudolph hannesrudolph marked this pull request as ready for review February 8, 2026 03:53
@dosubot dosubot bot added the UI/UX UI/UX related or focused label Feb 8, 2026
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Feb 8, 2026

⚠️ This PR is too big for Ellipsis, but support for larger PRs is coming soon. If you want us to prioritize this feature, let us know at help@ellipsis.dev


Generated with ❤️ by ellipsis.dev

@roomote
Copy link
Contributor

roomote bot commented Feb 8, 2026

Rooviewer Clock   See task

Reviewed the full PR (both commits). The provider removal is clean and thorough. The retired-provider UX concept is well-designed with consistent handling across types, storage, runtime, and UI layers. Found 2 issues:

  • Retired-provider-specific fields silently stripped during load/save -- providerSettingsWithIdSchema.parse() in ProviderSettingsManager.load() and saveConfig() drops fields like groqApiKey, deepInfraModelId, unboundModelId, etc. that are no longer in the schema. The exportProviderProfiles() path correctly skips parsing for retired providers, but load/save do not. (comment)
  • Hardcoded English string for retired-provider message -- The message in ApiOptions.tsx is not using i18n, unlike all other user-facing strings in the settings UI. (comment)

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph marked this pull request as draft February 8, 2026 03:55
Comment on lines 363 to 368
// For active providers, filter out settings from other providers.
// For retired providers, preserve full profile fields to avoid data loss.
const filteredConfig =
typeof config.apiProvider === "string" && isRetiredProvider(config.apiProvider)
? providerSettingsWithIdSchema.parse(config)
: discriminatedProviderSettingsWithIdSchema.parse(config)
Copy link
Contributor

Choose a reason for hiding this comment

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

providerSettingsWithIdSchema.parse(config) strips provider-specific fields that were removed from the schema (e.g. groqApiKey, deepInfraModelId, unboundModelId, huggingFaceModelId, ioIntelligenceModelId, doubaoApiKey, etc.) because Zod's default .parse() drops unknown keys. This contradicts the comment on line 363 about preserving full profile fields. The same issue exists in the load() method at line 597 where providerSettingsWithIdSchema.safeParse(sanitizedConfig) is called for all configs including retired ones. The exportProviderProfiles() method handles this correctly by skipping parsing entirely for retired providers (line 517-519). Consider using providerSettingsWithIdSchema.passthrough().parse(config) here, or skipping parsing for retired providers as exportProviderProfiles does. The test at line 570 only validates common fields like apiKey and apiModelId (which survive parsing), so it doesn't catch this.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph force-pushed the refactor/phase0-remove-low-usage-providers branch 2 times, most recently from 129a155 to 869e042 Compare February 8, 2026 04:07
Preserve API profiles that reference removed providers instead of
silently stripping their apiProvider. When a user selects a profile
configured for a retired provider, the settings UI now shows an
empathetic message explaining the removal instead of the provider
configuration form.

- Add retiredProviderNames array and isRetiredProvider() helper to
  packages/types/src/provider-settings.ts
- Update ProviderSettingsManager sanitization to preserve retired
  providers (only strip truly unknown values)
- Update ContextProxy sanitization to preserve retired providers
- Render retired-provider message in ApiOptions.tsx when selected
  provider is in the retired list
- Add tests for sanitization, ContextProxy, and UI behavior
@hannesrudolph hannesrudolph force-pushed the refactor/phase0-remove-low-usage-providers branch from 869e042 to aebcaa2 Compare February 8, 2026 04:25
@hannesrudolph hannesrudolph force-pushed the refactor/phase0-remove-low-usage-providers branch from a83bcef to b4db88c Compare February 8, 2026 05:26
Move WarningRow outside {task && ...} conditional so it renders
regardless of task state. Preserve user input on retired provider
intercept so text isn't lost when switching providers.

- Move showRetiredProviderWarning WarningRow to unconditional render
  area near ProfileViolationWarning
- Remove setInputValue/setSelectedImages clearing from retired
  provider early return in handleSendMessage
- Delete unused RetiredProviderWarning.tsx (dead code)
… strings

- Use passthrough() in saveConfig() and load() so legacy provider-specific
  fields (e.g. groqApiKey, deepInfraModelId) are preserved instead of
  silently stripped by strict Zod parse()
- Move hardcoded English strings in ApiOptions.tsx and ChatView.tsx to
  i18n translation keys (settings:providers.retiredProviderMessage,
  chat:retiredProvider.{title,message,openSettings})
- Update tests to assert legacy provider-specific fields survive
  save and load round-trips
Translate providers.retiredProviderMessage (settings) and
retiredProvider.{title,message,openSettings} (chat) into ca, de, es,
fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW.
@hannesrudolph hannesrudolph marked this pull request as ready for review February 8, 2026 07:17
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Feb 8, 2026

⚠️ This PR is too big for Ellipsis, but support for larger PRs is coming soon. If you want us to prioritize this feature, let us know at help@ellipsis.dev


Generated with ❤️ by ellipsis.dev

@roomote
Copy link
Contributor

roomote bot commented Feb 8, 2026

Rooviewer Clock   See task

Reviewed the full PR at 2a1be4f. All 4 previously flagged issues have been resolved. No new issues found. The provider removal is thorough, the retired-provider UX handles data preservation correctly via passthrough(), and all user-facing strings are properly localized.

  • Retired-provider-specific fields silently stripped during load/save -- Fixed with providerSettingsWithIdSchema.passthrough() in both saveConfig() and load(). (comment)
  • Hardcoded English string for retired-provider message in ApiOptions.tsx -- Fixed, now uses t("settings:providers.retiredProviderMessage"). (comment)
  • RetiredProviderWarning.tsx is now dead code -- Fixed, file has been deleted. (comment)
  • Hardcoded English string for retired-provider warning in ChatView.tsx -- Fixed, now uses t("chat:retiredProvider.*") keys. (comment)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

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

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant