SShortSingh.
Back to feed

Developer Moves AI Model Calls Out of CI Into a Caching Sidecar to Save Free Quota

0
·1 views

Repeated CI pipeline runs — triggered by pushes, retries, and scheduled jobs — were burning through free AI model quotas even when prompts had not changed. The author identified CI as a poor network client because it retries and reruns unconditionally, creating unnecessary upstream requests. To fix this, the model call was moved behind a lightweight sidecar server hosted on MonkeyCode's free tier, which caches responses by prompt hash and only contacts the upstream model when necessary. The sidecar normalises provider responses into a simple shape and returns a 502 error if the upstream reply is empty or malformed, keeping CI logic simple. The sidecar is built using only Go's standard library, avoiding extra dependencies on a free server slot.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

ReClaim Uses AI Visual Search to Modernize Campus Lost-and-Found Systems

ReClaim is a new campus-focused lost-and-found platform that replaces vague text descriptions with AI-powered visual search. Users upload photos of lost or found items, which are processed through a CLIP vision model to generate 512-dimensional image embeddings capturing shape, color, and texture. The system then compares these embeddings using cosine similarity, surfacing matches that exceed a 90% similarity threshold. Built with Next.js, FastAPI, PyTorch, and Firestore, the platform enforces standardized 3:4 image crops to improve model consistency. A key design feature is campus-level isolation, meaning searches are scoped to a single institution rather than a global database.

0
ProgrammingDEV Community ·

Developer shares key production lessons from building a real e-commerce system

A developer recently built a production-grade e-commerce system and documented the complex challenges encountered beyond basic functionality. Inventory management emerged as a critical concern, requiring safeguards against overselling and race conditions that beginners often overlook. Cart synchronization proved unexpectedly intricate, demanding frontend validation, localStorage management, and database syncing. A notable edge case revealed that a failed order does not guarantee a failed payment, highlighting the need to track all transactions for refunds and support. The project underscored that production systems must also address fraud protection, payment disputes, customer data privacy, and background database maintenance — concerns rarely faced during development.

0
ProgrammingHacker News ·

Experiment tests LLM trained exclusively on fifth-grade-level content

A research experiment explored what happens when a large language model is trained solely on material at or below a fifth-grade reading level. The project, published on GitHub Pages, investigates how restricting training data complexity affects the model's capabilities and outputs. The experiment raises questions about knowledge depth, reasoning ability, and language generation when an AI is exposed only to simplified content. Details of the methodology and findings are available on the project's dedicated website.

0
ProgrammingDEV Community ·

Developer Builds Agentic AI System to Automate Production Incident Resolution

A developer has created an open-source project called Agentic Production Support, designed to reduce engineers' manual workload in diagnosing and resolving production incidents. The system uses a Retrieval-Augmented Generation (RAG) pipeline to pull relevant historical incident data, allowing an AI agent to generate root cause analyses and recommend actions. A key component is a Model Egress Governance Layer that strips sensitive information — such as API keys, PII, and infrastructure details — before any data reaches the language model. For high-risk data like passwords or authorization tokens, the system defaults to blocking the model call entirely rather than risking exposure. Human approval remains mandatory for high-impact actions, keeping engineers in control while automating repetitive diagnostic steps.

Developer Moves AI Model Calls Out of CI Into a Caching Sidecar to Save Free Quota · ShortSingh