Trovald

    Trovald

    Trovald

    Trovald is an intelligent LLM proxy that sits between your application and AI providers, automatically routing and caching each request to the most cost-efficient model capable of handling it, with zero code changes required.

    Before any routing occurs, every request passes through a dual-layer cache. First, an exact match check in Redis using a SHA-256 hash of the request body: identical prompts return instantly with zero LLM cost. If that misses, a semantic cache powered by pgvector generates a 1536-dimension embedding and searches for prompts with cosine similarity above 0.95. Semantically equivalent questions like "What is the capital of Spain?" and "Tell me Spain's capital" return the cached response without ever reaching a provider.

    Only on a full cache miss does the platform classify the request by task type and complexity (chat, code generation, summarization, reasoning) and route it across 12 LLM providers including OpenAI, Anthropic, Google, Mistral, DeepSeek, and Groq. A Universal Stream Transformer normalizes response formats across all providers, making switching completely transparent to the application.

    I was responsible for the full technical architecture: the proxy pipeline (Bun + Hono), the task classifier and intelligent router, the circuit breaker system with 4-level fallback chain, the dual-layer cache (exact match in Redis + semantic cache with pgvector and 1536-dimension embeddings), and the prepaid wallet billing system integrated with Stripe.

    Additional systems include HMAC-signed webhook callbacks, budget alerts with cooldown logic, Best-of-N and Self-Consistency quality improvement features, and a prompt optimizer that reduces token consumption before requests reach providers. The entire stack runs on PostgreSQL 16 + pgvector, Redis 7, and is fully self-hostable.

    Trovald's pricing model charges 22% of the savings generated. If no savings are produced, nothing is charged. Companies using the platform reduce their monthly LLM spend by 30–60% from day one.

    Trovald has been featured by El Español and is currently raising a pre-seed round while applying to Y Combinator.

    Intelligent multi-provider LLM routing
    Dual-layer cache: exact (Redis) + semantic (pgvector)
    Circuit breaker with 4-level fallback chain
    Prepaid wallet & Stripe billing

    Gallery

    Trovald gallery

    Project Details

    Company:Trovald
    Author:Javier Loureiro & Pedro Ansio
    Date:March 2026
    Tags:AI, Bun, TypeScript, Semantic cache, Redis