feat(ai): BabeL-O as the only AI engine — remove hosted providers - #3
Merged
Conversation
Product decision (ADR-B7): remove ModelScope/DeepSeek/Moonshot direct integration and the cross-provider fallback chain. BabeL-O is the sole AI engine; models and keys are fully managed by BabeL-O (ADR-B2 endgame). - aiProfiles: AIProvider='babel' only; drop providerOrder/defaultModels/ providerBaseURLs/resolveAutoCandidates/resolveAIProviderFromEnv - routes/ai: buildProfilePayload simplified (json_object always for non-stream); POST /config keeps only babel; GET /config + 412 guard use live babel configured check - settingsStore: remove 3 provider API key states; persist version 2 + migrate clears stale localStorage - Settings: only BabeL-O card + model picker + test connection; key/model form, save button, auto mode removed - env.example: BABEL_NEXUS_URL/BABEL_NEXUS_API_KEY only - docs: ADR-B7 + fallback-related updates
- ai-config: babel baseURL join + empty model (ADR-B2), URL-missing unavailability, API key optional, live GET /config reflection - ai-routing: json_object + empty model on requests, followup cache hit, snapshot no-cache, schema failure -> direct error (no fallback), 429 -> direct failure (no fallback chain)
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
Product decision (ADR-B7,
docs/babel-ai-engine.md): BabeL-O is now the only AI engine. ModelScope/DeepSeek/Moonshot direct integration and the cross-provider fallback chain are removed; models & keys are fully managed by BabeL-O (ADR-B2 endgame).Changes
api/aiProfiles.ts:AIProvider = 'babel'only — droppedproviderOrder/defaultModels/providerBaseURLs/resolveAutoCandidates/resolveAIProviderFromEnv/getAIConfigFromEnv.api/routes/ai.ts:buildProfilePayloadsimplified (response_format: json_objectalways for non-stream);POST /api/ai/configkeeps only the babel branch;GET /api/ai/config+ 412 guard use live babel configured check. Fallback loop structure remains but with a single candidate (no cross-provider retry).src/stores/settingsStore.ts: removed 3 provider API-key states; persist version 2 + migrate clears stale localStorage (old keys/provider state dropped).src/pages/Settings.tsx: only the BabeL-O card + model picker + test connection remain; key/model form, save button, auto mode, "保存策略" (now "引擎配置") updated..env.example: onlyBABEL_NEXUS_URL/BABEL_NEXUS_API_KEY.ai-config(5) +ai-routing(5) rewritten for babel-only semantics — ADR-B2 empty model +json_objecton requests, followup cache hit, snapshot no-cache, schema failure → direct error, 429 → direct failure (no fallback).Verification
npm run check/npm run lintgreen (0 problems)npm run test:integration39/39 passNote