fix(jev): four verified transport defects (cost, model id, request cap, provenance) #50
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/jev-cost-model-provenance"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
All four are reproducible offline; none needed a live call or a credential.
key.endswith("cost"), case-sensitive, andbreakafter the first hit, sogateways that report
{"cost": "0", "marketCost": "0.000035322", "surchargeCost": "0"}were summed as zero. It now matches case-insensitively,sums every component, ignores booleans, and reports whether anything was
found. The summary prints
total_cost=unknownwhen no cost field came back,instead of a confident
0.00000000.the requested one literally, so a correct answer for
typesafe/jev-1.14labelled
typesafe/jev-1.14:20261015failed with SchemaMismatch. Comparisonnow ignores a
:snapshot suffix only; a different model family still fails,and the direct-TypeSafe
jev-*alias exemption is unchanged.reported_model(what the gateway says it served)next to
model(what was requested). Provenance, not a signature.--max-requests Ncaps HTTP requests per invocation across retries andprovider fallback, and raises RequestBudgetExceeded before the request that
would exceed it. 0 keeps the old unlimited behaviour.
All four are reproducible offline; none needed a live call or a credential. - jev_batch cost aggregation undercounted to zero. The matcher used `key.endswith("cost")`, case-sensitive, and `break` after the first hit, so gateways that report `{"cost": "0", "marketCost": "0.000035322", "surchargeCost": "0"}` were summed as zero. It now matches case-insensitively, sums every component, ignores booleans, and reports whether anything was found. The summary prints `total_cost=unknown` when no cost field came back, instead of a confident `0.00000000`. - A served snapshot id was rejected. Validation compared the reported model to the requested one literally, so a correct answer for `typesafe/jev-1.14` labelled `typesafe/jev-1.14:20261015` failed with SchemaMismatch. Comparison now ignores a `:` snapshot suffix only; a different model family still fails, and the direct-TypeSafe `jev-*` alias exemption is unchanged. - The result now records `reported_model` (what the gateway says it served) next to `model` (what was requested). Provenance, not a signature. - `--max-requests N` caps HTTP requests per invocation across retries and provider fallback, and raises RequestBudgetExceeded *before* the request that would exceed it. 0 keeps the old unlimited behaviour.