Repository navigation
What cookbook recipes should AI Gateway publish next? #178
Replies: 4 comments
|
Python would be ideal for these recipes, especially for the RAG and LlamaIndex use cases. For the 'RAG with cost-optimized routing' recipe, please show an end-to-end workflow that uses a structured data source rather than broken web scrapers. Connecting the gateway with something like ScholarAPI to stream clean academic JSON directly into LlamaIndex indexers would make a highly practical, production-ready blueprint. |
|
For the PII redaction recipe, I think TypeScript would be the most useful choice because this problem usually appears at the application boundary, just before a prompt reaches the gateway. I would make it work with deterministic mocks by default and add an optional live provider mode. The first output should show the original prompt inside the application, the redacted prompt received by the gateway, and the restored response returned to the application. The placeholder mapping should stay local. Logs should contain the detector type, confidence, and count, but never the matched value. I maintain Flare Redact, an MIT licensed TypeScript library built for this exact flow. It replaces PII with stable opaque placeholders before an OpenAI compatible request leaves the process, then restores those placeholders locally in the response. It also handles streamed responses where a placeholder can be split across chunks. The repository is https://github.com/umudhasanli/flare-redact I would be happy to help turn this into a gateway specific cookbook example if that direction is useful. |
|
A practical example where the gateway automatically routes requests based on model availability, latency, and cost, with fallback when the primary provider fails. This would be useful for production teams that want reliability without simply sending every request to their most expensive model. A complete Docker + README + test setup would make it easy to reproduce. |
Uh oh!
There was an error while loading. Please reload this page.
The AI Gateway cookbook should provide copy-pasteable examples with a README, Dockerfile,
make run, tests, and clear gateway configuration. We want the next recipes to match real user workflows.Starter ideas
What we want feedback on
trace_id, provider, cost, latency, routing decision?Please do not post provider API keys or private configs. Recipe examples should keep provider secrets in local gateway config or environment variables.
All reactions