Rand Stats

OpenRouter::API

zef:apogee
Revision history for OpenRouter::API

0.2.0  2026-10-04T22:33:41+01:00

    - OpenRouter's -1 "variable pricing" sentinel (sent for router
      models whose real cost depends on which underlying model a
      request gets routed to) is no longer reported as a literal -1
      price. Result::Model and Result::Endpoint now return an
      undefined price for both the sentinel and any other malformed
      negative value; Result::Model gains has-variable-pricing to
      tell the two apart. This is a behaviour change: callers that
      previously read a -1 price directly will see Nil instead, and
      Filter's max-input-cost / max-output-cost now correctly exclude
      router models from cost-bounded searches instead of letting
      them through as free.
    - Requires JSON::Fast 0.21.0 or later (zef:timo). 0.19 (cpan:TIMOTIMO)
      fails its own tests under the RakuAST compiler frontend that Rakudo
      2026.09 makes the default, so installing this distribution stopped
      at that dependency.

0.1.1  2026-04-30T00:12:54+01:00
    - Bump Github Actions to use node 24+

0.1.0  2026-04-25T02:59:02+01:00
    - Initial release
    - Read-only wrapper over OpenRouter's non-inference REST surface:
      model catalogue, per-model endpoint listings, providers, credits,
      daily activity / spending log, per-generation cost lookups, and
      ZDR-filtered endpoints.
    - Typed Result classes (Model, Endpoint, Provider, Credits,
      ActivityRow, Generation) with derived helpers (cheapest-endpoint,
      cost-per-1k-tokens, etc.) and .raw hash escape hatch.
    - Client-side search-models with keyword / cost / context-length /
      capability filters. 5-minute TTL catalogue cache, opt-out via
      :cache(False), explicit clear-cache.
    - Duck-typed get-generation multi accepts either a Str gen-id or a
      LLM::Chat::Backend::Response::OpenRouter — no hard dep on
      LLM::Chat (module stays Tier 0).
    - HTTP-Referer / X-Title attribution headers forwarded on every
      call when configured.