rmi-backend/app/core
cryptorugmunch 1b53332695 fix(auth): mount auth router + rename __init__ to router.py
P1.1 — Implement real ai_router.chat_completion / stream_chat_completion
using Ollama Cloud primary + OpenRouter fallback. Fixes AttributeError on
/api/v1/chat and /api/v1/wallet-clusters.

P1.2 — Fix broken RAG call paths: telegram bot now hits /api/v1/rag/v2/search
then ai_router.chat_completion; unified_wallet_scanner._rag_enrich uses
async httpx + correct path. Mount app.domains.databus.router.

P1.3 — Implement setup_otel / shutdown_otel in core/tracing.py and create
core/langfuse.py with init_langfuse / flush_langfuse as safe no-ops when
SDK is missing or env vars unset.

P1.4 — Fix Prometheus alert rule metric name drift:
rmi_requests_total -> rmi_http_requests_total (matches metrics.py).

P1.5 — Move dead admin_backend.py (1691 LOC) to app/domains/admin/router.py
and mount it. Admin login endpoint now reachable.

P2.1 — Rename app/domains/auth/__init__.py (507 LOC router file that broke
mypy) -> app/domains/auth/router.py. Mount app.domains.auth.router so
/register, /login, /wallet/*, /user/me, /2fa/*, OAuth, Telegram are live.

P2.1b — Add pyotp + qrcode to requirements.txt so 2FA endpoints don't 503.
2026-07-07 17:44:09 +07:00
..
__init__.py merge: chore/cleanup-remove-bloat-and-secrets into main 2026-07-02 01:24:22 +07:00
agent_memory.py refactor(telegram): move config/db/commands to app.domains.telegram.rugmunchbot (P4.6 cont) 2026-07-07 15:05:22 +07:00
auth.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
cerebras_provider.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
cost_tracker.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
db_pool.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
duckdb_analytics.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
errors.py feat(rmi-backend,audit): AppError hierarchy in app/core/errors.py (P1.10) 2026-07-06 17:56:36 +02:00
health.py merge: chore/cleanup-remove-bloat-and-secrets into main 2026-07-02 01:24:22 +07:00
health_route.py fix(rmi-backend,core): HEALTH_CHECK_DURATION + test_factory_has_minimum_routes (P5.1) 2026-07-06 23:23:55 +02:00
http.py merge: chore/cleanup-remove-bloat-and-secrets into main 2026-07-02 01:24:22 +07:00
langfuse.py fix(auth): mount auth router + rename __init__ to router.py 2026-07-07 17:44:09 +07:00
lifespan.py refactor(databus): move app.databus engine files to app.domains.databus (P4.5 cont) 2026-07-07 15:12:24 +07:00
llm_cache.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
logging.py merge: chore/cleanup-remove-bloat-and-secrets into main 2026-07-02 01:24:22 +07:00
metrics.py fix(rmi-backend,core): HEALTH_CHECK_DURATION + test_factory_has_minimum_routes (P5.1) 2026-07-06 23:23:55 +02:00
middleware.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
mistral_provider.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
model_eval.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
model_router.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
observability.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
prompt_registry.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
rate_limiter.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
redis.py feat(domains): consolidate bulletin, intelligence, markets, admin, referral, mcp + mypy gate 2026-07-07 16:43:49 +07:00
signal_generator.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
task_queue.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00
tracing.py fix(auth): mount auth router + rename __init__ to router.py 2026-07-07 17:44:09 +07:00
tron_provider.py style(rmi-backend): complete lint cleanup — 1175→0 ruff errors 2026-07-06 15:43:20 +02:00