feat: allow platform users to use external providers#232
Open
Saul-Gomez-J wants to merge 1 commit intolevante-hub:developfrom
Open
feat: allow platform users to use external providers#232Saul-Gomez-J wants to merge 1 commit intolevante-hub:developfrom
Saul-Gomez-J wants to merge 1 commit intolevante-hub:developfrom
Conversation
…rm models Introduces hybrid mode where platform-authenticated users can toggle "Use Other Providers" to access OpenRouter, OpenAI, Anthropic, etc. alongside their Levante Platform models. Key changes: - Qualified model references (providerId::modelId) to disambiguate models across multiple sources - useOtherProviders preference toggle in AccountPage - Unified catalog loader (loadSelectableModels) for all app modes - Model target resolver in main process for routing to correct backend - Extracted ProviderConfigPanel for reuse in ModelPage and AccountPage - 27 unit tests for modelRefs, selectableModels, and modelTargetResolver - vitest.config.ts with path aliases for test resolution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Kilo Code Review could not run — your account is out of credits. Add credits at app.kilo.ai to enable reviews on this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
providerId::modelId) disambiguate models that exist in multiple sources (e.g.,levante-platform::gpt-4ovsopenrouter::gpt-4o)useOtherProviderstoggle in AccountPage lets platform users enable external providers (OpenRouter, OpenAI, Anthropic, etc.) alongside their Levante Platform modelsloadSelectableModels()centralizes model loading for all app modes (standalone, platform pure, platform hybrid)ProviderConfigPanelfrom ModelPage for reuse in both ModelPage and AccountPagemodelRefs,selectableModels, andmodelTargetResolverFiles changed
New files (8):
src/shared/modelRefs.ts— build/parse/validate qualified model referencessrc/renderer/lib/selectableModels.ts— unified catalog loader for all modessrc/main/services/ai/modelTargetResolver.ts— main-process routing resolversrc/renderer/components/providers/ProviderConfigPanel.tsx— extracted provider config UIsrc/shared/modelRefs.test.ts— 9 testssrc/renderer/lib/selectableModels.test.ts— 10 testssrc/main/services/ai/__tests__/modelTargetResolver.test.ts— 8 testsvitest.config.ts— path alias resolution for testsModified files (14):
src/types/preferences.ts— addeduseOtherProviderspreferencesrc/main/services/preferencesService.ts— schema entry for new preferencesrc/renderer/pages/AccountPage.tsx— toggle + ProviderConfigPanel integrationsrc/renderer/pages/ModelPage.tsx— thin wrapper over ProviderConfigPanelsrc/renderer/hooks/useModelSelection.ts— uses unified catalogsrc/main/services/ai/providerResolver.ts— delegates to modelTargetResolversrc/main/services/aiService.ts— uses qualified refs for model info/provider lookupsrc/renderer/App.tsx,ChatPage.tsx,ProjectPage.tsx,ChatListContent.tsx,SettingsPage.tsx— adapted to qualified refssrc/renderer/locales/{en,es}/account.json— i18n keys for toggle sectionTest plan
pnpm test— 27 new tests pass (modelRefs, selectableModels, modelTargetResolver)pnpm typecheck— clean🤖 Generated with Claude Code