myapikey 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myapikey",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Personal LLM API gateway & proxy — one address + one API key for all your models. Forwards OpenAI & Anthropic calls to your backends with failover and a circuit breaker. Pure passthrough, no format translation. Self-hosted (CLI + web UI).",
|
|
6
6
|
"keywords": [
|
|
@@ -4,8 +4,10 @@ import type { Format, Provider, RouteKey, Usage } from "../shared/types";
|
|
|
4
4
|
import type { Store } from "./store";
|
|
5
5
|
import { UsageCollector } from "./tokens";
|
|
6
6
|
|
|
7
|
-
/** HTTP statuses that should trigger failover to the next provider.
|
|
8
|
-
|
|
7
|
+
/** HTTP statuses that should trigger failover to the next provider. 401/403
|
|
8
|
+
* included: a banned/invalid credential (e.g. "User has been banned") is dead
|
|
9
|
+
* for THIS source only - the same request may be fine on the next one. */
|
|
10
|
+
const RETRYABLE = new Set([401, 403, 408, 425, 429, 500, 502, 503, 504]);
|
|
9
11
|
|
|
10
12
|
/** Headers copied from upstream back to the client. */
|
|
11
13
|
const COPY_DOWN = ["content-type", "cache-control", "x-request-id", "openai-organization", "anthropic-ratelimit-requests-reset"];
|