@askalf/dario
Advanced tools
+26
-0
@@ -83,2 +83,28 @@ import { type IncomingMessage } from 'node:http'; | ||
| /** | ||
| * Parse upstream's effort-capability rejection: | ||
| * | ||
| * 400 {"type":"invalid_request_error","message":"This model does not | ||
| * support effort level 'max'. Supported levels: high, low, medium."} | ||
| * | ||
| * Observed live 2026-06-10 on `claude-opus-4-5-20251101` — the autodetected | ||
| * catalog exposes models that predate the newer effort tiers, and a pinned | ||
| * DARIO_EFFORT (the box pins `max`) hard-400s on them. Returns the rejected | ||
| * level plus the model's supported set, or null when the body is some other | ||
| * 400. NOTE: fable's effort intolerance is different in kind — a SOFT | ||
| * refusal (200 + stop_reason:"refusal"), invisible to this machinery — and | ||
| * stays handled by its measured clamp in resolveEffort. | ||
| * Exported for tests. | ||
| */ | ||
| export declare function parseEffortRejection(body: string): { | ||
| rejected: string; | ||
| supported: string[]; | ||
| } | null; | ||
| /** | ||
| * Pick the strongest effort level a model says it supports. Preference is | ||
| * descending capability — the caller asked for more than the model can do, | ||
| * so degrade as little as possible. Exported for tests. | ||
| */ | ||
| export declare const EFFORT_PREFERENCE: readonly string[]; | ||
| export declare function bestSupportedEffort(supported: readonly string[]): string; | ||
| /** | ||
| * Resolve an inbound API path to its upstream target + forwarding mode. | ||
@@ -85,0 +111,0 @@ * Allowlist semantics — anything unlisted is 403'd (prevents SSRF through |
+1
-1
| { | ||
| "name": "@askalf/dario", | ||
| "version": "4.8.57", | ||
| "version": "4.8.58", | ||
| "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1190521
0.7%23490
0.6%28
3.7%