* chore: remove dead Python modules and helpers
Delete unreferenced P0 code identified by the dead-code audit:
- services/llm/registry.py and its test-only coverage
- logging/adapters package (LlamaIndex log forwarding)
- textbook_struct.chapter_rebuild.detect_frames
- load_config_with_main_async and its async file helper
- memory.trace.iter_by_ids / latest_ts
- TokenTracker.format_summary
- WeixinChannel._api_get
- ArxivSearchTool.extract_arxiv_id_from_url
- FileLibraryStore migration scaffolding (_run_migrations et al.)
- eight small dead helpers in services, api/utils, and knowledge
- redundant runtime C2CMessage import in the QQ channel
* chore: drop the prompt-language shim and a dead storage helper
The book agents were the last in-tree users of blocks/_language.py, which
only re-exported services.prompt.language. Import the real module and
delete the shim. storage._storage_path_from_version_entry had no caller.
Verified: ruff F401/F811/F841/F821 on changed files; py_compile.
---------
Co-authored-by: Antonio-Faure <209759495+Antonio-Faure@users.noreply.github.com>
get_model_pricing returned the first dict key found inside the model
name, so gpt-4o-mini-2024-07-18 and openai/gpt-4o-mini matched gpt-4o
and were billed at the full model's rates. Pick the longest matching
key instead.
- Replace litellm with native openai + anthropic SDKs across both
services and tutorbot layers
- Add 5 new providers: mistral, stepfun, xiaomi_mimo, qianfan, ovms
- Add `backend` field to ProviderSpec for SDK routing
- New TutorBot OpenAICompatProvider (openai SDK) and AnthropicProvider
(anthropic SDK), replacing LiteLLMProvider
- Rewrite services/llm/executors.py to use openai SDK directly
- Remove litellm from factory.py routing, token_tracker, provider_cmd
- Auto-fallback to streaming for tool-call format errors (fixes#265)
- Settings UI: provider dropdown with auto base-url fill
- Clean up litellm from requirements/cli.txt and pyproject.toml
Made-with: Cursor