Skip to content

feat(ai): BabeL-O as the only AI engine — remove hosted providers - #3

Merged
SuTang-vain merged 2 commits into
mainfrom
feature/babel-only-engine
Aug 9, 2026
Merged

feat(ai): BabeL-O as the only AI engine — remove hosted providers#3
SuTang-vain merged 2 commits into
mainfrom
feature/babel-only-engine

Conversation

@SuTang-vain

Copy link
Copy Markdown
Owner

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 — dropped providerOrder / defaultModels / providerBaseURLs / resolveAutoCandidates / resolveAIProviderFromEnv / getAIConfigFromEnv.
  • api/routes/ai.ts: buildProfilePayload simplified (response_format: json_object always for non-stream); POST /api/ai/config keeps 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: only BABEL_NEXUS_URL / BABEL_NEXUS_API_KEY.
  • Tests: ai-config (5) + ai-routing (5) rewritten for babel-only semantics — ADR-B2 empty model + json_object on requests, followup cache hit, snapshot no-cache, schema failure → direct error, 429 → direct failure (no fallback).

Verification

  • npm run check / npm run lint green (0 problems)
  • npm run test:integration 39/39 pass

Note

  • Stability now relies on BabeL-O's internal retry/failure classification; upstream failures surface as explicit AetheL errors (documented in ADR-B7).

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)
@SuTang-vain
SuTang-vain merged commit 8b16281 into main Aug 9, 2026
1 check passed
@SuTang-vain
SuTang-vain deleted the feature/babel-only-engine branch August 9, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant