new central AI config#2351
Merged
Merged
Conversation
This was referenced Jun 3, 2026
🎩 PreviewA preview build has been created at: |
This was referenced Jun 3, 2026
Closed
Collaborator
Author
8 tasks
morgan-wowk
reviewed
Jun 4, 2026
morgan-wowk
left a comment
There was a problem hiding this comment.
🤖 AI-assisted review — one finding on AI config migration/fallback.
6d1148f to
f45f4ff
Compare
e26d2d4 to
192afb4
Compare
f45f4ff to
e3d54e8
Compare
5cc28c3 to
dcda267
Compare
64ad138 to
2e44870
Compare
113c315 to
641682c
Compare
2e44870 to
05fecb2
Compare
camielvs
reviewed
Jun 4, 2026
camielvs
reviewed
Jun 4, 2026
camielvs
reviewed
Jun 4, 2026
014a78e to
3219213
Compare
dd55cdd to
cbc77c2
Compare
a413182 to
e7028c0
Compare
4e24f5b to
a5f79e9
Compare
a66b440 to
d7ea616
Compare
a5f79e9 to
44d756c
Compare
d7ea616 to
293f685
Compare
df8545e to
e1bcfa8
Compare
1d7643e to
a2a024a
Compare
e1bcfa8 to
fe0c0df
Compare
morgan-wowk
approved these changes
Jun 5, 2026
camielvs
approved these changes
Jun 5, 2026
fe0c0df to
e9fb75d
Compare
a2a024a to
3defa6e
Compare
Collaborator
Author
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
e9fb75d to
64e23f3
Compare
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.

Description
Replaces the hardcoded
aiAssistantConfig.jsonand single-token proxy model with a unified bring-your-own-provider configuration (AiProviderConfig) that is stored in localStorage undertangle.aiProvider.configand shared across all AI features (AI assistant, component search reranking, and component description generation).Key changes:
src/types/aiProvider.tswith the sharedAiProviderConfiginterface (apiBase,apiKey,model), all of which are now optional exceptapiBase.src/config/aiAssistantConfig.json,src/agent/aiTokenStore.ts, andsrc/hooks/useComponentSearchSettings.ts. Their responsibilities are absorbed by the newuseAiProviderSettingshook (tangle.aiProvider.configstorage key) which falls back to the legacytangle.componentSearchV2.configkey and migrates the oldthinkingModelfield.isConfigurednow only requiresapiBaseto be non-empty;apiKeyandmodelare optional to support proxy setups that own authentication and model selection.ProxyClient.ensureConfigurednow acceptsAiProviderConfiginstead of a raw token string. WhenapiKeyis blank, theAuthorizationheader is stripped from outgoing requests via a custom fetch wrapper.tangleDispatcher,debugAssistant,generalHelp,pipelineArchitect,pipelineRepair) now receive model configuration viagetAgentModelConfig(session.aiConfig)spread into the agent constructor, replacing therequireOrchestratorModel/requireSubagentModelcalls.AgentSessioncarriesaiConfigso every agent and tool has access to the provider config without touching module-global state.AiTokenSetupcomponent is replaced byAiProviderSetup, which links to the settings page instead of prompting for a raw token.component-search-v2orai-assistantfeature flag is enabled.AgentSettingsandnaturalLanguageComponentSearchServiceis relaxed to require onlyapiBase; API requests omit theAuthorizationheader andmodelfield when those values are blank.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
component-search-v2orai-assistantis enabled.isConfiguredbecomes true.AiProviderSetupprompt (link to settings) when no provider is configured, and loads the chat interface once configured.tangle.componentSearchV2.configis read correctly as a fallback and thatthinkingModelis migrated tomodel.Additional Comments
The
tangle.componentSearchV2.configkey is still read as a fallback but is removed from localStorage on the nextclear()call. No explicit one-time migration is performed; the fallback read handles existing users transparently.