From 43a504dc1f0aaf32a392913a4a31c32cf4969f6f Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Sun, 30 Aug 2026 01:05:43 -0700 Subject: [PATCH] Sync the skill body: the latency preference and what it costs Mirrors getanyapi-com/anyapi#879. The "Latency and request deadlines" section taught an agent to read a SKU's published p50/p95/p99 and then offered nothing to do about a slow one. Every SKU has accepted an optional preferLatencyUnderMs since anyapi#874. The paragraph carries the default (omit it and routing is unchanged), the warning that sending it can raise the price, quote_api as the free way to see that difference first, and the two cases where the field is inert so an agent does not read a deliberate no-op as a failure. Body-only sync, produced by `npm run sync-skills` in the anyapi repo. Co-Authored-By: Claude Opus 5 (1M context) --- skills/anyapi/SKILL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skills/anyapi/SKILL.md b/skills/anyapi/SKILL.md index 3c6a192..08537b9 100644 --- a/skills/anyapi/SKILL.md +++ b/skills/anyapi/SKILL.md @@ -107,6 +107,8 @@ Before choosing an HTTP client timeout or MCP tool deadline, inspect the selecte `latency` is `null` when no successful observations are available or metrics could not be read. A p99 is an observation, not a maximum or a recommended timeout. If `excludesCallerDelay` is true, your wall-clock time also includes whatever waiting the request asks for. +You can also ask routing to favour a faster source instead of only reading the numbers. Every SKU accepts an optional `preferLatencyUnderMs` in the request body: sources whose published 30-day median is under your target serve first, the cheapest of those wins, and a request is never refused for being slow. Omit it and routing is unchanged, with the cheapest source serving. **Send it and you may pay more** - when the cheapest source misses your target, a faster and dearer one serves and you are charged its price. Call `quote_api` with and without the field to see that difference before you spend anything. It does nothing on a SKU with one source or with sources we have not timed, and on a paginated walk it applies to the first page only. + ### SDKs - build AnyAPI into your app Use an official SDK when AnyAPI should become part of the product flow rather than an agent-only tool, and your app is written in TypeScript, JavaScript, Node, or Python. The SDKs are the recommended integration path for those languages: prefer them over hand-rolling HTTP. They give you a typed method per SKU, handle auth, and track the catalog because they are generated from the same `openapi.json`.