Commit graph

10 commits

Author SHA1 Message Date
Daniel
6cfa82f571
Revert to pre-AI-SDK state (January 29, 2026) (#11462)
Revert to pre-AI-SDK state (commit 67e568f6b)

This commit reverts the codebase to the state before AI SDK migration work began.

Target commit: 67e568f6b - refactor: replace fetch_instructions with skill tool and built-in skills (#10913)
Date: January 29, 2026

This removes approximately 152 commits of AI SDK migration work.
A follow-up PR will add back bug fixes and features that are unrelated to AI SDK.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13 16:45:18 -05:00
Hannes Rudolph
ef2fec9a23
refactor: remove 9 low-usage providers and add retired-provider UX (#11297)
* refactor: remove 9 low-usage providers (Phase 0)

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

* feat: show retired-provider message for removed provider profiles

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

* feat: add retired-provider warning banner in chat view

* Revert "feat: add retired-provider warning banner in chat view"

This reverts commit dd593e1056.

* feat: show retired-provider message as inline chat response

* fix: show retired provider warning on home screen

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)

* fix: address PR review — passthrough retired-provider fields and i18n 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

* i18n: add retired-provider translations for all 17 locales

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.

* test: update ApiOptions retired-provider test to expect i18n key
2026-02-09 09:40:59 -07:00
Hannes Rudolph
1b75d59a68
fix(ai-sdk): preserve reasoning parts in message conversion (#11217)
* fix(ai-sdk): preserve reasoning parts in message conversion

* fix(ai-sdk): convert message-level reasoning_content to reasoning part

* fix(task): remove invalid openai-compatible from reasoning allowlist

* feat: add isAiSdkProvider() method for dynamic AI SDK provider detection

- Add isAiSdkProvider() method to ApiHandler interface
- Default implementation in BaseProvider returns false
- Override to return true in 11 AI SDK providers:
  deepseek, fireworks, mistral, groq, xai, cerebras,
  sambanova, huggingface, gemini, vertex, openai-compatible
- Update Task.ts to use dynamic detection instead of hardcoded Set
- Add method to FakeAIHandler and update test mocks

* fix: handle reasoning parts in flattenAiSdkMessagesToStringContent

- Strip reasoning parts when flattening messages for string-only models
- Allow flattening when message contains only text and reasoning parts
- Add tests for reasoning part handling in string-only model contexts

This addresses the review feedback about ensuring flattenAiSdkMessagesToStringContent
works correctly when reasoning parts are present (e.g., SambaNova DeepSeek).

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
2026-02-05 10:48:21 -07:00
roomote[bot]
460cff4c3b
feat: migrate HuggingFace provider to AI SDK (#11156)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
2026-02-03 11:59:26 -05:00
Chris Estreich
3171ffc809
Move more types to @roo-code/types (for the cli) (#10583) 2026-01-09 11:59:06 -08:00
Hannes Rudolph
6ba793137d
Revert "feat: enable mergeToolResultText for all OpenAI-compatible providers (#10299)" (#10381) 2025-12-29 16:07:24 -07:00
Hannes Rudolph
ded6486a46
feat: enable mergeToolResultText for all OpenAI-compatible providers (#10299) 2025-12-23 14:19:33 -07:00
roomote[bot]
65146b1b12
fix: add error transform to cryptic openAI SDK errors when API key is invalid (#7586)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-09-04 23:12:28 -04:00
Thomas G. Lopes
31d16dcc33
Hugging Face provider: add more details (#6190)
* add more details

* format details better

* fix tests

* fix: address PR #6190 review feedback

- Move huggingface-models.ts to src/api/providers/fetchers/huggingface.ts
- Remove 'any' types and add proper TypeScript interfaces
- Add missing i18n keys and translations for all languages
- Replace magic numbers with named constants
- Add JSDoc documentation for HuggingFaceModel interface
- Improve error handling in API endpoint
- Update model capabilities display to match other providers
- Remove tool calling display (not used)
- Add comprehensive test coverage for new UI features

* fix: preserve HuggingFace provider details in model response

- Store raw HuggingFace models in cache to preserve provider information
- Export getCachedRawHuggingFaceModels to retrieve full model data
- Update huggingface-models.ts to return cached raw models when available
- Include provider name in model descriptions
- Always add provider-specific variants to show all available providers
- Remove console.log statements from fetcher

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-25 20:09:09 -04:00
Matt Rubens
bcad858b2f
basic hugging face provider (#6134)
* basic hugging face provider

* fetch hf models and providers

* save provider to config

* Update translations

---------

Co-authored-by: Thomas G. Lopes <26071571+TGlide@users.noreply.github.com>
2025-07-23 15:19:23 -04:00