Notes

20 entries · latest 2026-11-19

Field notes from requests we have debugged: what changes when an OpenAI SDK points at another gateway, and how to tell whether the gateway is doing what it claims.

All notes

01–21
032026-11-17
1M-token context without hitting the timeout

A million-token context is not a feature you switch on; it is a budget you spend on every call. Three things break when teams first use one: the request exceeds the window and returns 400 because somebody counted characters instead of token…

042026-11-17
Parse an SSE stream with nothing but curl

Before you debug a library, debug the wire. `curl` sends exactly what you tell it to send and shows you exactly what comes back, which makes it the fastest way to separate "my SDK misbehaves" from "the endpoint buffers" or "usage is missing…

052026-11-17
OpenAI Node SDK vs raw fetch for streaming

Both paths speak the same protocol and neither is faster; what differs is where the complexity lives. The `openai` package gives you typed responses, retries, timeouts and an async iterator over events — and hides the raw stream, which is e…

062026-11-17
Prompt cache misses and byte-identical prefixes

Prefix caching is automatic on the DeepSeek tiers this platform serves: nothing to enable, no cache API, no TTL to manage. It still fails for most teams, because a cache is matched on bytes.

072026-11-17
Reasoning model empty content: three causes

The request succeeds, `finish_reason` looks plausible, and `message.content` is empty. Three different faults produce that symptom and they need three different fixes, so the useful question is not "why is the model broken" but "where did t…

082026-11-17
Moving off OpenRouter: an eight-point checklist

Both endpoints speak the OpenAI wire format, so the migration looks like a base URL change and a new key. It is not: model identifiers differ, OpenRouter-specific body fields and headers are meaningless or harmful elsewhere, and features yo…

102026-11-17
Per-request LLM cost accounting in micro-dollars

Token pricing is a three-part formula with a time-dependent multiplier, and the obvious implementation — floats, rounded per term — drifts far enough to break reconciliation by the end of a month.

112026-11-17
How to prove a gateway actually streams

A response can be labelled `text/event-stream`, be chunked on the wire, and still arrive as one lump because something in the path is holding bytes until the body is complete.

122026-11-17
Vendor DPA and data-retention questions to ask

"We do not log your prompts" is a claim about one hop in a chain that usually has two. The question that matters is not whether the API gateway stores your payload, but what happens to it afterwards, for how long, in which country, and unde…

132026-11-19
Point any OpenAI SDK at Modelry in two lines

Repointing an OpenAI client at another endpoint is sold as a one-line change, and it is — until the first request comes back with a body shape you did not expect.

152026-11-19
LiteLLM proxy for a DeepSeek-only gateway

LiteLLM already speaks OpenAI, so pointing it at a DeepSeek gateway is one YAML entry — provided the entry has `openai/` in front of the model id and `/v1` on the `api_base`. Both are documented and both are easy to miss.

172026-11-19
An OpenRouter alternative for DeepSeek

If more than nine out of ten of your calls are DeepSeek, a marketplace with hundreds of models is infrastructure you pay for in two currencies: money and attention. This page is a decision aid rather than a pitch.

192026-11-19
What a DeepSeek request actually costs

A per-million-token price list is not a bill. One request is charged on three separate buckets — input that missed the cache, input that hit it, and output — and the price of the first two is different from the third by a factor of nearly f…

202026-11-19
Six checks before you repoint a client at /v1

"OpenAI-compatible" is a claim about the request body and, often, nothing else. The endpoint will accept your messages array and return something that looks like a completion, then differ on the six things your code silently depends on: the…

212026-11-19
DeepSeek rate limits and what a retry covers

A rate limit is three separate limits wearing one name: requests per minute per key, non-streaming requests in flight, and a wall-clock ceiling on a single request.