v2.12.0 — Cierre de backlog v3: failover, compresión semántica, bot Telegram, RPC, Docker - #12
Merged
Merged
Conversation
…ca, bot Telegram, RPC multi-host, logs litellm y deploy Docker Dominio: - providers_service: pick_provider — provider efectivo por request con failover: si el destino con api_base local/LAN no responde (chequeo TCP 0.4s), cae al primer fallback alcanzable de fallback_provider_ids; retorna flag es-provider-activo para decidir litellm vs directo. - Nuevo compression_service: compresión semántica opt-in — al acercarse al límite de contexto resume la mitad vieja del historial con el provider activo (sin partir pares tool_use/tool_result); cualquier fallo cae al truncado clásico. - Nuevo telegram_bot: relay opt-in por long-polling al gateway (TELEGRAM_BOT_TOKEN + allowlist de chat ids; allowlist vacía = inerte). - llamacpp_service: rpc_servers en local_launch (--rpc, granja multi-PC); tail_file movido a core/utils. - models/provider.py: fallback_provider_ids en el registry. Aplicación: - messages.py y openai_compat.py: resolución vía pick_provider; anthropic vía litellm solo si es el provider activo; hook de compresión semántica en el punto de truncado. - api/providers.py: routing GET/PUT extendido con fallback_provider_ids (None = no tocar). - api/proxy.py: GET /proxy/logs (tail de litellm-out/err). - api/settings.py: auth-info expone semantic_compression. Infraestructura: - settings_service.write_env_key: aplica en caliente (os.environ + cache_clear). - Frontend: campo failover en RoutingPanel, toggle de compresión semántica y viewer de logs litellm en Settings, proxyApi.getLogs, tipos actualizados. - main.py: task del bot Telegram en lifespan. Configuración: - Dockerfile multi-stage (node build + python slim + litellm[proxy]), docker-compose con volumen persistente, .dockerignore; sección de deploy en README; imagen construida y smoke-testeada localmente (/api/health 200 en contenedor). - config.py: flag semantic_compression; bump version a 2.12.0. Pruebas: - test_failover.py (6), test_compression_service.py (13), test_telegram_bot.py (13); test_routing/test_messages_native/test_openai_compat actualizados a pick_provider. Cobertura global del proyecto: suite backend 147 passed; tsc frontend sin errores.
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.
Resumen
local_launch.rpc_serverssuma workersggml-rpc-serverremotos (--rpc) — la granja multi-PC.Test plan
🤖 Generated with Claude Code