frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Mock LLM APIs locally with real-world streaming physics

https://vidai.uk/platform/mock/
2•nagug•2h ago

Comments

nagug•2h ago
Hey everyone,

I’m part of the team at Vidai, based in Scotland 󠁧󠁢󠁳󠁣󠁴󠁿, and today we’re open-sourcing VidaiMock.

If you’ve built anything with LLM APIs, you know the drill: testing streaming UIs or SDK resilience against real APIs is slow, eats up your credits, and is hard to reproduce reliably. We tried existing mock servers, but most of them just return static JSON. They don't test the "tricky" parts—the actual wire-format of an OpenAI SSE stream, Anthropic’s EventStream, or how your app handles 500ms of TTFT (Time to First Token) followed by a sudden network jitter.

We needed something better to build our own enterprise gateway (Vidai.Server), so we built VidaiMock.

What makes it different?

- Physics-Accurate Streaming: It doesn't just dump text. It emulates the exact wire-format and per-token timing of major providers. You can test your loading states and streaming UI/UX exactly as they’d behave in production.

- Zero Config / Zero Fixtures: It’s a single ~7MB Rust binary. No Docker, no DB, no API keys, and zero external fixtures to manage. Download it, run it, and it just works.

- More than a "Mock": Unlike tools that just record and replay static data (VCR) or intercept browser requests (MSW), VidaiMock is a standalone Simulation Engine. It emulates the actual network protocol (SSE vs EventStream).

- Dynamic Responses: Every response is a Tera template. You aren't stuck with static strings—you can reflect request data, generate random contents, or use complex logic to make your mock feel alive.

- Chaos Engineering: You can inject latency, malformed responses, or drop requests using headers (X-Vidai-Chaos-Drop). Perfect for testing your retry logic.

- Fully Extensible: It uses Tera (Jinja2-like) templates for every response. You can add new providers or mock internal APIs by dropping a YAML config and a J2 template.

- High Performance: Built in Rust. It can handle very high RPS. (tested uptp 51000RPS in Mac Pro M4)

Why are we open-sourcing it? It’s been our internal testing engine for a while. We realized that the community is still struggling with mock-infrastructure that feels "real" enough to catch streaming bugs before they hit production.

We’re keeping it simple: Apache 2.0 license.

Links:

Home: https://vidai.uk GitHub: https://github.com/vidaiUK/VidaiMock Docs: https://vidai.uk/docs/mock/intro/

I’d love to hear how you’re currently testing your LLM integrations and if this solves a pain point for you. I'll be around to answer any questions!

Sláinte, The Vidai Team (from rainy Scotland)

WeDLM: Reconciling Diffusion LM with Standard Causal Attention

https://github.com/Tencent/WeDLM
1•simonpure•1m ago•0 comments

Dialogue Is an Antidote for Populism

https://deliberation.stanford.edu/dialogue-antidote-populism
1•neehao•2m ago•0 comments

Linux is now better than Windows

1•roschdal•3m ago•1 comments

ISON: Interchange Simple Object Notation

https://github.com/maheshvaikri-code/ison
1•handfuloflight•4m ago•0 comments

Quake Done 100% Quickest Commentary [video]

https://www.youtube.com/watch?v=EBfDOMdBCV8
1•zppln•5m ago•1 comments

Show HN: Explorer – Find interesting things around you via Wikipedia

https://web.izeria.com/points-of-interest
1•eltados•7m ago•0 comments

'Move fast, break stuff': how tech bros became Hollywood's go-to baddie in 2025

https://www.theguardian.com/film/2025/dec/30/move-fast-break-stuff-how-tech-bros-became-hollywood...
1•mitchbob•11m ago•1 comments

Welcome to Gas Town

https://steve-yegge.medium.com/welcome-to-gas-town-4f25ee16dd04
2•gmays•15m ago•0 comments

Hydra: A system for building 3D Scene Graphs from sensor data in real-time

https://github.com/MIT-SPARK/Hydra
1•sritchie•16m ago•0 comments

Docc2json Convert your Xcode-built DocC documentation into a API deployable JSON

https://github.com/AppGram/docc2json
1•nedim0x01•16m ago•0 comments

NVCA Model Legal Documents

https://nvca.org/model-legal-documents/
1•wslh•17m ago•0 comments

Hydra: Live Coding Video Synth

https://hydra.ojack.xyz/
1•bcye•18m ago•0 comments

A small experiment in making math click for my cousins

https://farhadg.com/blog/seeing-math-differently/
1•FarhadG•19m ago•0 comments

Nudel.cc: public live coding jam space

https://nudel.cc/
2•bcye•20m ago•0 comments

Git-pkgs: explore your dependency history

https://nesbitt.io/2026/01/01/git-pkgs-explore-your-dependency-history.html
1•chmaynard•23m ago•0 comments

Migrating to Immich from Google Photos for Better Backups

https://tsmith.com/blog/2025/immich-migration/
2•sea-gold•27m ago•0 comments

Composing capability security and conflict-free replicated data types

https://spritely.institute/news/composing-capability-security-and-conflict-free-replicated-data-t...
1•PaulHoule•28m ago•0 comments

Flowlog: An ISO-style Prolog system with faster search on multicore CPUs

https://web.liminal.cafe/~byakuren/flowlog/
1•triska•28m ago•0 comments

Shipping at Inference-Speed

https://steipete.me/posts/2025/shipping-at-inference-speed
1•gozzoo•29m ago•0 comments

Iran offers to sell advanced weapons systems for crypto

https://www.ft.com/content/d1ceb1a4-3493-4776-ae22-c94d76dc478f
2•smurda•30m ago•0 comments

The Science of Resolutions (2019)

https://www.newyorker.com/magazine/2019/10/28/can-brain-science-help-us-break-bad-habits
1•mitchbob•30m ago•1 comments

Generating Human Faces with VAEs

https://mayberay.bearblog.dev/generating-human-faces-with-variational-autoencoders/
1•mugamuga•30m ago•0 comments

Order Taking, Pain Killers, and Desperation: Avoiding Middling Startup Outcomes

https://rosslazer.com/posts/order-taking/
1•rosslazer•30m ago•0 comments

A 58-Addition, Rank-23 Scheme for General 3x3 Matrix Multiplication

https://arxiv.org/abs/2512.21980
1•ColinWright•31m ago•1 comments

U.S. grants TSMC annual licence to import U.S. chipmaking tools into China

https://www.reuters.com/world/asia-pacific/us-grants-annual-approval-tsmc-chipmaking-tool-exports...
3•DustinEchoes•33m ago•1 comments

What Are Context Graphs, Really?

https://subramanya.ai/2026/01/01/what-are-context-graphs-really/
1•subramanya1997•33m ago•0 comments

Seven students unmasked Russia's 'drone motherships'

https://ioplus.nl/en/posts/how-seven-students-unmasked-russias-drone-motherships
3•tartoran•35m ago•0 comments

CAPTCHAs and the punishment of privacy-conscious users

https://www.coryd.dev/posts/2025/captchas-and-the-punishment-of-privacy-conscious-users
2•cdrnsf•37m ago•0 comments

How LLMs Generate Text [video]

https://www.youtube.com/watch?v=NKnZYvZA7w4
1•y0eswddl•38m ago•1 comments

Wall Street is starting 2026 with echoes of 2000's dot-com woes

https://www.marketwatch.com/story/wall-street-is-starting-2026-with-echoes-of-2000s-dot-com-woes-...
1•zerosizedweasle•38m ago•0 comments